Rahul wrote: > I made a custom syntax highlighting file for one of our chemistry > coordinate file formats. > > I wanted it to be on by default but issue a "syn off" whenever I start > editing the file (otherwise it is hard to keep the syntax highlighting > in a consistent, meaningful state during partial edits) > > Is it possible to automatically run a "syn off" the moment I start > "editing" a file. By editing I mean making any changes whatsoever. > > This way whenever a user opens a file the highlighting is present. But > as soon as he edits it disappears and then finally if he wants he can > manually issue a "syn on" after he has again brought the file to a > meaningful parseable state. > > Just wondering how to achieve this via a vim hack! > You could use InsertEnter and InsertLeave autocmds. Won't affect normal mode changes, though.
Regards, C Campbell --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
