On Thursday, August 2, 2012 4:55:33 AM UTC-5, Paddy wrote:
> Hi all,
>
> I'm having an issue running Vim 7.3 on my Windows 7 workstation. I'm using it partly for editing todo files, for which I created a simple custom syntax file. I use the following command to use my syntax file on *.todo files, in my vimrc :
>
> $ au BufNewFile,BufRead *.todo set ft=todo
>
> This works perfectly when I open the files using right-click "Edit with Vim" entry, but it doesn't when I double click the file in the explorer, or use the app launcher launchy (http://launchy.net) to open the file (":set ft" returns nothing, and the syntax highlighting is indeed not applied).
>
> I made some tests and tried to apply the filetype to txt files as well using the following command in my vimrc :
>
> $ au BufNewFile,BufRead *.txt set ft=todo
>
> ...and it's working great in both cases. Any idea what I'm missing here ? I made some research this morning, went through some help files and tried other autocmd events, but didn't find anything better.
>
> Thanks for your help !
> Cheers,
>
> Paddy
I've never had any problems with Windows file associations (double-click in explorer). What is the command invoked to launch the file in Vim? Perhaps you can get this with the "ftype" and "assoc" windows shell commands, or by examining the registry:
http://vim.wikia.com/wiki/Windows_file_associations
Can you reproduce this problem with a very minimal .vimrc, preferably with just enough in it to set up the autocmds in question?
--
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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment