Sunday, February 7, 2016

How to identify the trigger of a FilterWritePre event

A FilterWritePre event is triggered by either a filter command or diff. I would like to identify that the event is just triggered by diff, not by any filter commands.
I tried to check a &diff variable, but it is always 1 for both running a filter command on diff mode window and running diff on non-diff mode window, then can not identify.

I know this event is triggered on 2 buffers when running diff once. But if 2 filter commands are run on 2 different buffers (e.g. :windo %!sort), the same things happen.

Does anyone know how to do that? I would appreciate any idea.

--
--
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:

Post a Comment