Date: Thu, 17 Jun 2010 11:23:28 -0400
From: [email protected]
To: [email protected]
Subject: Re: How to test filetype in _vimrc

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
>

What you want is something like this:

:au BufNew,BufRead *.bat :syntax off

see :help :au

   -ak

Thanks for the reply. I tried using the 'au' command you mentioned, but syntax 
still remains ON when I open a '.bat' file. This is one of those things I know 
should not be this difficult, yet the solution remains elusive.

 
                                          
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2

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