" NrrwRgn.vim - Narrow Region plugin for Vim " ------------------------------------------------------------- " Version: 0.29 " Maintainer: Christian Brabandt " Last Change: Mon, 20 Aug 2012 19:34:23 +0200 " " Script: http://www.vim.org/scripts/script.php?script_id=3075 " Copyright: (c) 2009, 2010 by Christian Brabandt " The VIM LICENSE applies to histwin.vim " (see |copyright|) except use "NrrwRgn.vim" " instead of "Vim". " No warranty, express or implied. " *** *** Use At-Your-Own-Risk! *** *** " GetLatestVimScripts: 3075 29 :AutoInstall: NrrwRgn.vim " " Init: {{{1 let s:cpo= &cpo if exists("g:loaded_nrrw_rgn") || &cp finish endif set cpo&vim let g:loaded_nrrw_rgn = 1 " Debug Setting let s:debug=0 if s:debug exe "call nrrwrgn#Debug(1)" endif " ---------------------------------------------------------------------------- " Public Interface: {{{1 " Define the Command aliases "{{{2 com! -range -bang NRPrepare :,NRP com! -range NarrowRegion :,NR com! -bang NRMulti :NRM com! -bang NarrowWindow :NW com! -bang NRLast :NRL " Define the actual Commands "{{{2 com! -range -bang NR :, call nrrwrgn#NrrwRgn() com! -range NRP :exe ":" . . ',' . . 'call nrrwrgn#Prepare()' com! NRV :call nrrwrgn#VisualNrrwRgn(visualmode()) com! NUD :call nrrwrgn#UnifiedDiff() com! -bang NW :exe ":" . line('w0') . ',' . line('w$') . "call nrrwrgn#NrrwRgn()" com! -bang NRM :call nrrwrgn#NrrwRgnDoPrepare() com! -bang NRL :call nrrwrgn#LastNrrwRgn() " Define the Mapping: "{{{2 if !hasmapto('NrrwrgnDo') xmap nr NrrwrgnDo endif if !hasmapto('NrrwrgnBangDo') xmap Nr NrrwrgnBangDo endif if !hasmapto('VisualNrrwRgn') xnoremap