Yakov Lerner wrote:
On 9/20/06, Fabien Meghazi <[EMAIL PROTECTED]> wrote:
But I would like these autocmd's to match those files without .py
extensions.
My question is :
Is it possible to make an autocmd pattern's to match something in the
first line's buffer with a regexp eg: ( ^#\!.+python or something
like that ) instead of the filename ?
We typically do it as follows:
:au BufReadPost * if getline(1) =~ 'pattern' | do something | endif
Also, one is "supposed" to put such things in
.vim/scripts.vim
(or vimfiles\scripts.vim if you're a Windozer)
See :help new-filetype-scripts .
Regards,
Chip Campbell