FormatBlock : Format (i.e., gqq) a block of lines above/below the current line
script karma |
Rating 4/3,
Downloaded by 999 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Gary Holloway |
|
script type |
utility |
|
description |
" Format (i.e., gqq) a block of lines above/below the current line from the
" line matching <beg_pattern> to the line matching <end_pattern>; intervening
" lines of the block should match <in_pattern>, if given.
"
" EXAMPLE SETUP
" Format block (do a 'gq' format) on a C-style statement (i.e., from cursor's
" line to line ending with ';'):
"
" map gqs :call FormatBlock('', ';$', '')<CR>
Primarily used as a "helper" function to FormatComment ( vimscript #886 ) |
|
install details |
I put this in my autoload directory (~/vim/autoload), so the function is automagically loaded as needed via an autocommand:
autocmd FuncUndefined * exe 'runtime autoload/' . expand('<afile>') . '.vim' |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 52.14.244.195
|