NrrwRgn : A Narrow Region Plugin similar to Emacs
| script karma
Downloaded by 3213
Comments, bugs, improvements
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.104.22.168
||- set local options later, so that FileType autocommands don't trigger to early
- make sure, shortening the buffer name handles multibyte characters correctly.
- new public function nrrwrgn#NrrwRgnStatus()
- <Leader>nr also mapped as operator function (so the region over which you move will be opened in the narrowed window
- highlighting wrong when char-selecting within a line
- needs Vim 7.4
- mention how to abort the narrowed window (suggested by David Fishburn, thanks!)
- Execute hooks after the options for the narrowed window have been set (issue #29, reported by fmorales, thanks!)
- <Leader><Space> Toggles the Narrowed Window Size (idea by David Fishburn, thanks!)
- New hook b:nrrw_aucmd_written, to be executed, whenever the narrowed info has been written back into the original buffer.
- g:nrrw_rgn_write_on_sync is being deprecated in favor of using the newly written hook
- error on writing back multi narrowed window (issue #30, reported by aleprovencio https://github.com/chrisbra/NrrwRgn/issues/30, thanks!)
- error when calling Incr Function, Make it override over global mapping. (issue #31, reported by zc he https://github.com/chrisbra/NrrwRgn/issues/31, thanks!)
- |:NRP| didn't work as documented (reported by David Fishburn, thanks!)
- fix small syntax error in autoload file (issue #32, reported by itchyny (https://github.com/chrisbra/NrrwRgn/issues/32, thanks!)
- check, that dict key is available before accessing it (issue #33, reported by SirCorion (https://github.com/chrisbra/NrrwRgn/issues/33, thanks!)
||- hooks could corrupt the narrowed buffer, if it wasn't closed (reported by
jszakemeister https://github.com/chrisbra/NrrwRgn/issues/19, thanks!)
- Don't parse /doc/options.txt for finding out buffer-local options
(reported by AguirreIF https://github.com/chrisbra/NrrwRgn/issues/21,
thanks!), instead include a fix set of option names to set when opening the
- Switching buffers in the original narrowed buffer, may confuse NrrwRgn.
- Code cleanup (no more separate functions for visual and normal mode)
- fix issue 22 (characterwise narrowing was brocken in last commit, reported
by Matthew Boehm in https://github.com/chrisbra/NrrwRgn/issues/22, thanks!)
- in characterwise visual selection, trailing \n is not stripped when writing
(reported by Matthew Boehm in https://github.com/chrisbra/NrrwRgn/23,
- highlighting was wrong for characterwise visual selections
- update original window for multi narrowed regions (
https://github.com/chrisbra/NrrwRgn/24, reported by Dane Summers, thanks!),
use the g:nrrw_rgn_update_orig_win variable to enable
- error when narrowed window was moved to new tab and trying to quit
(https://github.com/chrisbra/NrrwRgn/2, reported by Mario Ricalde, thanks!)
- better default names for the narrowed window
(https://github.com/chrisbra/Nrrwrgn/28, reported by Mario Ricalde, thanks!)
- when setting g:nrrw_rgn_write_on_sync the original file will be saved,
whenever the narrowed window is written back
(https://github.com/chrisbra/26, reported by Mario Ricalde, thanks!)
- Some more error handling when using |:WidenRegion|
- Make sure highlighting is removed when using |:WidenRegion|
||- NRM threw some errors (reported by pydave in
- don't create swapfiles (reported by ping, thanks!)
||- |NRL| throws erros, when used without having first narrowed a region - |NRV!| not allowed (reported by ping, thanks!)
- when using single window narrowing, :w would jump back to the original window. Only do this, when 'hidden' is not set (reported by ping, thanks!)
- when narrowing a region, the last visual selected region wasn't correctly restored (reported by ping, thanks!)
- some code cleanup
- recursive narrowing was broken, fix it (reported by ping, thanks!)
- Use ! to have the narrowed buffer not opened in a new window (suggested by
Greg Sexton thanks!, issue #8
- Fix mappings for visual mode (https://github.com/chrisbra/NrrwRgn/issues/9,
reported by Sung Pae, thanks!)
- Fix problem with setting the filetype
(https://github.com/chrisbra/NrrwRgn/issues/10, reported by Hong Xu,
- Fix some minor problems, when using ! mode
||- Plugin did not store last narrowed region when narrowed window was moved to another tabpage (reported by Ben Fritz, thanks!)
||- When using |:NR| on a line that is folded, include the whole folded region in the Narrowed window.
- Better filetype detection for comments
- Error handling, when doing |:NRM| without doing |:NRP| first
- Use |:NRP!| to clear the old selection
- Don't load the autoload script when sourcing the plugin script (reported by Sergey Khorev, thanks!)
- Vim 7.3.449 introduced E855, prevent this error.
- |NRM| did not correctly parse the list of lines provided by |:NRP|
- highlighted pattern for blockwise visual narrowed regions was wrong
- Saving blockwise visual selected regions back, could corrupt the contents
||- Fix issue https://github.com/chrisbra/NrrwRgn/issues/7 (reported by Alessio B., thanks!)
||- updated documentation (patch by Jean, thanks!)
- make it possible, to not sync the narrowed buffer back by disabling
it using |:NRSyncOnWrite| |:NRNoSyncOnWrite|
||(uploaded as release 0.24, as 0.23 was falsly uploaded to vim.org)
||-Fix issue https://github.com/chrisbra/NrrwRgn/issues/5
||- allow customization via the g:nrrw_topbot_leftright variable
(Thanks Herbert Sitz!)
- allow what options will be applied using the g:nrrw_custom_options dict
(suggested by Herbert Sitz. Thanks!)
- NRV didn't hightlight the region that was selected
(reported by Herbert Sitz, Thanks- use the g:nrrw_rgn_protect variable, to prevent that the original buffer
will be protected. This is useful, if you narrow several regions of the
same buffer and want to write those changes indepentently
(reported by kolyuchiy in https://github.com/chrisbra/NrrwRgn/issues/3,
Thanks- fix an error with not correctly deleting the highlighted region, that was
discovered when reporting issue 3 (see above).
(Reported by kolyuchiy, thanks!)
- Catch errors, when setting window local options.
(Patch by Sung Pae, Thanks!)
||fix issue 2 from github https://github.com/chrisbra/NrrwRgn/issues/2
(Widening does not work, if the narrowed windows have been moved to a new tabspace). Reported by vanschelven, thanks!
- experimental feature: Allow to Narrow several different regions at once using :g/pattern/NRP and afterwards calling :NRM (This only works linewise. Should that be made possible for any reagion?)
- disable folds, before writing changes back, otherwise chances are, you'll lose more data then wanted
- code cleanup
||- cache the options, that will be set (instead of parsing
$VIMRUNTIME/doc/options.txt everytime) in the Narrowed Window
- getting the options didn't work, when using an autocommand like this:
autocmd BufEnter * cd %:p:h
(reported by Hong Xu, Thanks!)
- :q didn't clean up the Narrowed Buffer correctly. Fix this
- some code cleanup
||- Bugfix: copy all local options to the narrowed window (reported by Xu Hong, Thanks)
- Make :q quit the narrowed window correctly
||-minor documentation update (reported by Hong Xu, Thanks!)
||- Bugfix: :only in the original buffer resulted in errors (reported by Adam
||This adds the experimental feature of using the command :NUD to view a chunk of a unified diff in diff-mode
||The Vimball for Version 0.11 contained some garbage that causes various errors.. So this Version is a new packaged version and should work now. Not sure how that happened.
(Thanks Dennis Hostetler!)
||Don't set 'winfixwidth' and 'winfixheight'
||- Restore Cursorposition using winrestview() and winsaveview()
- fix a bug, that prevented the use of visual narrowing
- Make sure when closing the narrowed buffer, the content will be written to
the right original region
- use topleft for opening the Narrowed window
- check, that the original buffer is still available
- If you Narrow the complete buffer using :NRV and write the changes back, an
additional trailing line is inserted. Remove that line.
- When writing the changes back, update the highlighting.
||- It is now possible to Narrow a window recursively. This allows to have
several narrowed windows, and allows for example to only diff certain
regions (as was suggested in a recent thread at the vim_use mailinglist:
http://groups.google.com/group/vim_use/msg/05d7fd9bd1556f0e) therefore, the
use for the g:nrrw_rgn_sepwin variable isn't necessary anymore.
- Small documentation updates
||- the g:nrrw_rgn_sepwin variable can be used to force seperate Narrowed Windows, so you could easily diff those windows.
- make the separating of several windows a little bit safer (look at the bufnr(), so it should work without problems for several buffers)
- switch from script local variables to buffer local variables, so narrowing for several buffers should work.
- set 'winfixheight' for narrowed window
- Added command :NRV (suggested by Charles Campbell, thanks!)
- added error handling, in case :NRV is called, without a selected region
- take care of beeps, when calling :NRV
- output WarningMsg
||- really use the black hole register for deleting the old buffer contents in the narrowed buffer (suggestion by esquifit in http://groups.google.com/group/comp.editors/msg/3eb3e3a7c68597db)
- make autocommand nesting, so the highlighting will be removed when writing the buffer contents.
- Use g:nrrw_rgn_nohl variable to disable highlighting (as this can be disturbing).
- the previous version had problems restoring the orig buffer, this version fixes it (highlighting and setl ma did not work correctly)
Version 0.5 (unreleased):
- The mapping that allows for narrowing a visually selected range, did not work. (Fixed!)
- Make :WidenRegion work as expected (close the widened window)
||- Highlight narrowed region in the original buffer
- Save and Restore search-register
- Provide shortcut commands |:NR|
- Provide command |:NW| and |:NarrowWindow|
- Make plugin autoloadable
- Enable GLVS (see |:GLVS|)
- Provide Documenation (:h NarrowRegion)
- Distribute Plugin as vimball |pi_vimball.txt|