I'm hitting an odd bug when I define an event which involves splitting a window. I've isolated it down to the following example:
autocmd CursorMoved * :execute ":silent! split /perl/module/mymod.pm"
where mymod.pm is a valid perl module with valid perl syntax.
In any case I have syntax coloring enabled for perl modules, yet when it hits a CursorMoved event it splits the window displaying the code but NOT coloring the syntax. When I run
:hi
it shows all of the highlighting configurations so I'm pretty sure it has something to do with the event combined with the execute action. Running:
:syn on
after the CursorMoved event happens is ignored.
Anyways I'm running the latest 8.1 source - I tried it with a python module and a vimrc file and both hit the same issue.
if there is a vim bug repo let me know and I'll file an official bug.
thanks much,
Ed
(ps - one other bug - it looks like a split event triggered by CursorMoved at the very outset - right after the editor loads up - causes vim to freeze until an interrupt is given. )
I don't see any documentation on that keyword inside of vim. Not seeing much on the internet either.
Can you give an example and why it is needed - or am I missing something in the docs?
Thanks much,
Ed
thanks Gary, I found it by doing grep -r of the vim source directory. Your methods are much cleaner though...
Ed