columnskip.vim icon indicating copy to clipboard operation
columnskip.vim copied to clipboard

Move vertically with skipping whitespaces

columnskip.vim

This plugin provides vertical movement mappings which skips whitespaces.

non-blank mappings

Go to the next/previous line of same indent as current column.

nonblank screencapture

" Example
nmap sj <Plug>(columnskip:nonblank:next)
omap sj <Plug>(columnskip:nonblank:next)
xmap sj <Plug>(columnskip:nonblank:next)
nmap sk <Plug>(columnskip:nonblank:prev)
omap sk <Plug>(columnskip:nonblank:prev)
xmap sk <Plug>(columnskip:nonblank:prev)

first non-blank mappings

Go to the next/previous line whose first character is non-blank.

first non-blank screencapture

" Example
nmap s] <Plug>(columnskip:first-nonblank:next)
omap s] <Plug>(columnskip:first-nonblank:next)
xmap s] <Plug>(columnskip:first-nonblank:next)
nmap s[ <Plug>(columnskip:first-nonblank:prev)
omap s[ <Plug>(columnskip:first-nonblank:prev)
xmap s[ <Plug>(columnskip:first-nonblank:prev)