zz
: 화면 가운데로zt
: 화면 맨 위로zb
: 화면 맨 아래로:let &scrolloff=999-&scrolloff
Vim Toggle Movement: I Just Want to Go Home - @_ddrscott_
function! ToggleMovement(firstOp, thenOp) let pos = getpos('.') execute "normal! " . a:firstOp if pos == getpos('.') execute "normal! " . a:thenOp endif endfunction " The original carat 0 swap nnoremap <silent> 0 :call ToggleMovement('^', '0')<CR> " How about ; and , nnoremap <silent> ; :call ToggleMovement(';', ',')<CR> nnoremap <silent> , :call ToggleMovement(',', ';')<CR> " How about H and L nnoremap <silent> H :call ToggleMovement('H', 'L')<CR> nnoremap <silent> L :call ToggleMovement('L', 'H')<CR> " How about G and gg nnoremap <silent> G :call ToggleMovement('G', 'gg')<CR> nnoremap <silent> gg :call ToggleMovement('gg', 'G')<CR>