Saturday, August 16, 2014

Re: Treat section of file as entire file

On Sa, 16 Aug 2014, Eric Christopherson wrote:

>
> I see g:nrrw_rgn_write_on_sync was just deprecated; its replacement is a
> buffer-local hook:
>
> From NarrowRegion.txt:
> | A third hook 'b:nrrw_aucmd_written' is provided, when the data is written back
> | in the original window. This allows to execute scripts, whenever the data is
> | written back in the original window. For example, consider you want to write
> | the original buffer whenever the narrowed window is written back to the
> | original window. You can therefore set: >
> |
> | :let b:nrrw_aucmd_written = ':update'
> | <
> | This will write the original buffer, whenever it was modified after writing
> | the changes from the narrowed window back.
>

Note, that the old variable g:nrrw_rgn_write_on_sync will still be used
for a couple of versions, until it will be entirely useless. The reason
is, the hook is more flexible and g:nrrw_rgn_write_on_sync is really
just a special case of the mentioned hook.

It just isn't mentioned in the documentation, so that the users can
adjust their configurations slowly.

Best,
Christian
--
Aus Murphy's Gesetze:
Das einzige Backup, das du je brauchst, ist das, für das du keine Zeit
hattest.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: