FormatBlock : Format (i.e., gqq) a block of lines above/below the current line
| script karma
Downloaded by 587
Comments, bugs, improvements
script versions (upload new version)
|" 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 )
|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'
Click on the package to download.
ip used for rating: 220.127.116.11