On 2009-09-08, rajesh wrote:
> Hi vim_dev, I am using gvim to open multiple files. Every time I open
> a new file using "open Tab" option under file Menu, It is required to
> use ":set syntax=verilog". I wanted this to be made permanent so that
> whenever I open a new windows that syntax should be applied by
> default. Thanks in Adavance -- Siva
Here's one approach. This will set the filetype to "verilog" if no
other filetype has been determined by the time the BufWinEnter event
occurs.
au BufWinEnter * if &ft == "" | set ft=verilog | endif
This does more that just set the syntax, which I think is better.
Modify to suit.
HTH,
Gary
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---