" vis.vim: " Function: Perform an Ex command on a visual highlighted block (CTRL-V). " Date: May 18, 2010 " GetLatestVimScripts: 1066 1 cecutil.vim " GetLatestVimScripts: 1195 1 :AutoInstall: vis.vim " Verse: For am I now seeking the favor of men, or of God? Or am I striving " to please men? For if I were still pleasing men, I wouldn't be a servant " of Christ. (Gal 1:10, WEB) " --------------------------------------------------------------------- " Details: {{{1 " Requires: Requires 6.0 or later (this script is a plugin) " Requires (see :he vis-required) " " Usage: Mark visual block (CTRL-V) or visual character (v), " press ':B ' and enter an Ex command [cmd]. " " ex. Use ctrl-v to visually mark the block then use " :B cmd (will appear as :'<,'>B cmd ) " " ex. Use v to visually mark the block then use " :B cmd (will appear as :'<,'>B cmd ) " " Command-line completion is supported for Ex commands. " " Note: There must be a space before the '!' when invoking external shell " commands, eg. ':B !sort'. Otherwise an error is reported. " " Author: Charles E. Campbell - NOSPAM " Based on idea of Stefan Roemer " " ------------------------------------------------------------------------------ " Initialization: {{{1 " Exit quickly when has already been loaded or " when 'compatible' is set if &cp finish endif let s:keepcpo= &cpo set cpo&vim " ------------------------------------------------------------------------------ " Public Interface: {{{1 " -range : VisBlockCmd operates on the range itself " -com=command : Ex command and arguments " -nargs=+ : arguments may be supplied, up to any quantity com! -range -nargs=+ -com=command B silent ,call vis#VisBlockCmd() com! -range -nargs=* -com=expression S silent ,call vis#VisBlockSearch() " Suggested by Hari -- if exists("g:vis_WantSlashSlash") && g:vis_WantSlashSlash vn // /=vis#VisBlockSearch() endif vn ?? ?=vis#VisBlockSearch() " --------------------------------------------------------------------- " Modelines: {{{1 " vim: fdm=marker