1.- to protect it from crashing when I use vim 6.x
>> I guess there has to be something similar to the python sys.version or
>> sys.version_info variables.
>>
>
> :help v:version
>

I already found v:version on the web. I am embedding the whole function into
a

if v:version > 700

endif


 -----------------------------------------------------------------------



>
>  2.- to detect the filetype, so I don't hardcode the default to '#' but to
>> the one
>> for that filetype in particular instead.
>>
>
> You should be able to use &filetype as long as filetype detection is
> turned on for Vim itself.
>
>
At the end I am inspecting the actual filename itself, which I get from
expand('%:p')
Then I search for different regex's like '.py$', '.conf$', '.vim$', ...
Not very nice, but it works :)

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