Links tagged “vimtip”
1 link, newest first.
vim.org
map <silent> H :<C-U>call HContext()<CR> map <silent> L :<C-U>call LContext()<CR> func! HContext() let moved = MoveCursor("H") if !moved && line('.') != 1 exe "normal! " . "\<pageup>H" endif endfunc func! LContext() let moved = MoveCursor("L") if !moved && line('.') != line('$') exe "normal! " . "\<pagedown>L" endif endfunc func! MoveCursor(key) let cnum = col('.') let lnum = line('.') let wline = winline() exe "normal! " . v:count . a:key let moved = cnum != col('.') || lnum != line('.') || wline != winline() return moved endfunc
