2014-07-03から1日間の記事一覧

Vim のカーソルをバッファ末尾まで移動したら先頭に戻る

vim

いわゆる 'whichwrap' のような挙動をバッファの先頭/末尾で行うスクリプトを書いてみた。 [ソース] function! Up(key) if line(".") == 1 return ":call cursor(line('$'), col('.'))\<CR>" else return a:key endif endfunction function! Down(key) if line("</cr>…