Saturday, December 8, 2012

Re: calling a function on bufenter,bufnew,bufread

On Friday, December 7, 2012 2:34:02 PM UTC-6, Chris Lott wrote:
> On Fri, Dec 7, 2012 at 10:43 AM, Ben Fritz <fritzophrenic@gmail.com> wrote:
>
> >
>
> > au BufNewFile,BufEnter,BufRead vimperator.txt call WW()
>
> >
>
> > In the future, or if this doesn't solve your problem, "it isn't working" is not helpful at all
>
>
>
> Sorry, I will amend it to the complete problem:
>
>
>
> "the call to the function in the autocommand did nothing." Happy?
>
>

Actually more precise would be even better. For example:

"After loading vimperator.txt from within Vim using :e vimperator.txt, the options set in the WW() function remain at their previous value. But, after invoking my mapping, the options set in the WW() function are set to the values from the function body."

Bonus points for using methods to determine whether your function is being called as suggested by Gary and David.

You mention the VimWriteRoom() function may be interfering. Have you tried moving it to the top of your function, or removing it entirely? You say it's from a plugin. Which one?

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

No comments:

Post a Comment