Skip to main content

iwata motonori's Library tagged ruby   View Popular

02 Jul 08

surround.vim をカスタマイズする - ursmの日記

let g:surround_{char2nr('%')} = "%(\r)" let g:surround_{char2nr('w')} = "%w(\r)" let g:surround_{char2nr('#')} = "#{\r}" let g:surround_{char2nr('e')} = "begin \r end" let g:surround_{char2nr('i')} = "if \1if\1 \r end" let g:surround_{char2nr('u')} = "unless \1unless\1 \r end" let g:surround_{char2nr('c')} = "class \1class\1 \r end" let g:surround_{char2nr('m')} = "module \1module\1 \r end" let g:surround_{char2nr('d')} = "def \1def\1\2args\r..*\r(&)\2 \r end" let g:surround_{char2nr('p')} = "\1method\1 do \2args\r..*\r|&| \2\r end" let g:surround_{char2nr('P')} = "\1method\1 {\2args\r..*\r|&|\2 \r }"

d.hatena.ne.jp/...1207150539 - Preview

ruby vim

Vim+xmpfilterでirbいらずのRuby試行錯誤開発 - ナレッジエース

" <S-F1>で現在行/選択行にxmpfilterを実行 map <silent> <S-F1> !xmpfilter -a<cr> nmap <silent> <S-F1> V<S-F1> imap <silent> <S-F1> <ESC><S-F1>a " <S-F2>でバッファ全体にxmpfilterを実行 nmap <silent> <S-F2> mzggVG!xmpfilter -a<cr>'z imap <silent> <S-F2> <ESC><S-F2> " <S-F3>で現在行/選択行に「# =>」マークを追加 vmap <silent> <S-F3> !xmpfilter -m<cr> nmap <silent> <S-F3> V<S-F3> imap <silent> <S-F3> <ESC><S-F3>a " <S-F4>で現在行/選択行の「# =>」マークを削除 vmap <silent> <S-F4> ms:call RemoveRubyEval()<CR> nmap <silent> <S-F4> V<S-F4> imap <silent> <S-F4> <ESC><S-F4>a function! RemoveRubyEval() range let begv = a:firstline let endv = a:lastline normal Hmt set lz execute ":" . begv . "," . endv . 's/\s*# \(=>\|!!\).*$//e' normal 'tzt`s set nolz redraw endfunction

blog.blueblack.net/item_307 - Preview

vim ruby gem

1 - 20 of 62 Next › Last »
Showing 20 items per page

Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »

Join Diigo