function DetectFind()
let myfn = "/home/cts/nodes/vim/".expand ("%:t").".vim"
execute "source ".myfn
endfunction
au BufNewFile,BufRead /home/cts/nodes/f0/test/find/* call DetectFind()
And it works fine when I start up vim - if there's a vim file with the same root as the file I'm editing, it'll colorize it.
The problem is, if I switch buffers and come back, it doesn't colorize - I suspect that DetectFind() isn't being invoked again.
I've looked at all kinds of things, did_filetype, my own did_* flags, clearing autocmds, verbose mode, etc. etc.
Any help will be appreciated
--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/GFfp4YlD9Pw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You forgot about 'hidden' option. By default it is not set and vim reads buffer from disk each time it disappears from all windows and then is viewed again. Thus if one does not use windows and have default setting for 'hidden' there are less differences. BufRead is not fired for new files though.
> Hope it helps,
> Marcin
>
> ps. please do not top-post the list prefers bottom-posting.
>
> --
> --
> 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+u...@googlegroups.com.