02/01/14 21:56
foo.vim解読続き。
>>109の別の方法
map <M-4> :call LastNonBlank()<CR>
fun! LastNonBlank()
let i = matchend(getline("."), '.*\S')-1
if i > 0
execute "normal!0" . i . "l"
elseif i == 0
execute "normal!0"
endif
endfun
現在行で .*\S で最後にヒットする位置を取得して最初に 0 で行頭に移動してからそ
の位置へ l で移動する。最初に 0 しないで | で直接指定カラムに飛べば if else は
必要無くなるような気がする。