NrrwRgn
NrrwRgn copied to clipboard
Make NrrwRgn work together with ZoomWin
To me NrrwRgn only is truly awesome when it works together with ZoomWin. Personally, i'd like to grab some piece i'm editing on, do a :NRon it, then zoom into that window so that i have the select piece distraction-free to edit on.
Unfourtnately, the moment i do a :ZoomWinon the NarrowRegion buffer i lose the sync. When i want to write that buffer it says No matching autocommands for acwrite buffer . Furthermore, i then cant redo a :NR as the the selected piece of text persists to be protected even after closing the NarrowRegion buffer.
UPDATE: I just realised that i can get a new window directly when doing a :NR! which pretty much solves my problem. On the other the possiblity to have the split screens & selectivly zoom in and out of them would still be a neater way to work.
Can this be fixed?
Hm, what Version of ZoomWin are you using? It seems to work for me, but the highlighting does not seem to be restored. Also doing a :w in the narrowed buffer does automatically close the window. I don't know why this happens, but I'll look into it.
This still seems to occur:
- select a region
- open it in a split by
:NR - call
:ZoomWin - switch to another tab page and back
- call
:ZoomWin
Result: The background of the selected region is black. Expected: The background of the selected region is unchanged.
As a workaround, the lines in vimrc
autocmd BufWinEnter * let b:nrrw_aucmd_create = .
\ "nmap <buffer> <c-w>o <Plug>NrrwrgnWinIncr"
remap <c-w>o from ZoomWin to toggle the zoom of the NrrwRgn scratch window.