On 06/17/2010 11:20 AM, Roy Fulbright wrote:
>
> I am trying to test for filetype '.bat' in _vimrc and set syntax off. I
tried adding the following to _vimrc but it does not work:
>
> 
>
> if v:fname_in =~ '.bat$'
>
>    syntax off
>
> end if
>
> 
>
> I echoed v:fname_in and it was NULL. I also echoed v:fname_out and it
was also NULL. That seems strange. Can someone offer a solution?
>
> 
>
> Thanks,
>
> Roy Fulbright
>
> 
>                           
> _________________________________________________________________
> The New Busy is not the old busy. Search, chat and e-mail from your inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
>

What you want is something like this:

:au BufNew,BufRead *.bat :syntax off

see :help :au

   -ak

-- 
 Python plugins for vim: outliner, todo list, project manager, calendar,
 expenses tracker, sortable table, and more | http://lightbird.net/pysuite/


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

Reply via email to