NrrwRgn icon indicating copy to clipboard operation
NrrwRgn copied to clipboard

Make NrrwRgn work together with ZoomWin

Open bijzz opened this issue 13 years ago • 3 comments

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?

bijzz avatar Nov 29 '12 19:11 bijzz

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.

chrisbra avatar Dec 01 '12 12:12 chrisbra

This still seems to occur:

  1. select a region
  2. open it in a split by :NR
  3. call :ZoomWin
  4. switch to another tab page and back
  5. call :ZoomWin

Result: The background of the selected region is black. Expected: The background of the selected region is unchanged.

Konfekt avatar Feb 01 '20 18:02 Konfekt

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.

Konfekt avatar Mar 25 '20 21:03 Konfekt