"新しい行のインデントを現在行と同じにする
set autoindent
"バックアップファイルを作るディレクトリ
set backupdir=$HOME/vimbackup
"ファイル保存ダイアログの初期ディレクトリをバッファファイル位置に設定
set browsedir=buffer
"クリップボードをWindowsと連携
set clipboard=unnamed
"Vi互換をオフ
set nocompatible
"スワップファイル用のディレクトリ
set directory=$HOME/vimbackup
"タブの代わりに空白文字を挿入する
set expandtab
"変更中のファイルでも、保存しないで他のファイルを表示
set hidden
"インクリメンタルサーチを行う
set incsearch
"タブ文字、行末など不可視文字を表示する
set list
"listで表示される文字のフォーマットを指定する
set listchars=eol:$,tab:>\ ,extends:<
"行番号を表示する
set number
"シフト移動幅
"set shiftwidth=4
"閉じ括弧が入力されたとき、対応する括弧を表示する
set showmatch
"検索時に大文字を含んでいたら大/小を区別
set smartcase
"新しい行を作ったときに高度な自動インデントを行う
set smartindent
"行頭の余白内で Tab を打ち込むと、'shiftwidth' の数だけインデントする。
set smarttab
"ファイル内の <Tab> が対応する空白の数
"set tabstop=4
"カーソルを行頭、行末で止まらないようにする
set whichwrap=b,s,h,l,<,>,[,]
"検索をファイルの先頭へループしない
set nowrapscan
"縦幅
set lines=50
"横幅
set columns=150
"入力モード時、ステータスラインのカラーを変更
augroup InsertHook
autocmd!
autocmd InsertEnter * highlight StatusLine guifg=#ccdc90 guibg=#2E4340
autocmd InsertLeave * highlight StatusLine guifg=#2E4340 guibg=#ccdc90
augroup END
"日本語入力をリセット
au BufNewFile,BufRead * set iminsert=0
"タブ幅をリセット
au BufNewFile,BufRead * set tabstop=4 shiftwidth=4
"全角スペースを視覚化
highlight ZenkakuSpace cterm=underline ctermfg=lightblue guibg=#666666
au BufNewFile,BufRead * match ZenkakuSpace / /
"常にタブを表示
set showtabline=2
"透明度を変更
set transparency=3
map <silent> gw :macaction selectNextWindow:
map <silent> gW :macaction selectPreviousWindow:
"フォント設定
set guifontwide=Osaka:h12
set guifont=Osaka-Mono:h14
Evernoteを起動して、Preferencesを表示する。
「Clipping」タブをクリックして、「After a clip」のチェックボックスを全て外す。
(インポートするときに毎回通知のアクションが走るので。)
Apple Scriptの作成
以下のApple Scriptを作成します。
set listOfNames to {}
set theFolder to choose folder "Select the source folder"
tell application "Finder"
set filelist to every file of the folder theFolder
repeat with currentFile in filelist
set currentFileName to (the name of currentFile)
set nom to currentFileName
if text -4 of nom is "." then
set currentFileName to (text 1 thru -5 of nom)
end if
set currentFileDate to (the creation date of currentFile)
set currentFileLocation to currentFile as alias
set currentFileFolder to (the name of theFolder)
tell application "Evernote"
create note title currentFileName created currentFileDate notebook currentFileFolder from file currentFileLocation
end tell
end repeat
end tell