Wednesday, August 22, 2012

Autocmds

I have a Perl script, filename 'thescript'. Vim correctly identifies it as a Perl script when I open it. I have various autocmds set up for when I open .pl files, which naturally don't execute on thescript.

I can :doautocmd whenever I want to execute relevant autocmds, but that doesn't mean that thescript has those autocmds associated with it. Is there a way I can tell vim to pretend that thescript is called thescript.pl, and therefore have those autocmds associated with it (without renaming the file)? Or is there some way of defining autocmds to work on filetype as well as or instead of filename pattern?

--

.

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

No comments: