[fpc-pascal] Vim FileType for pascal files

bartek bbartek at gmx.net
Sun Feb 24 14:20:55 CET 2008


On Sunday 24 February 2008 13:29:45 Damien Gerard wrote:
> 
> hi !
> 
> I use includes files and a vim editor. Obviously  .inc are not  
> recognized as pascal files.
> I tried the following :
> // vim:ts=4:filetype=pascal
> 
> but it does not work.
> 
> Any ideas ?
> 
Hi, its nice to see another user of fpc+vim ;)

My way of detecting .inc and .pp:

% cat .vim/ftdetect/pp.vim
au BufRead,BufNewFile *.pp	set filetype=pascal
au BufRead,BufNewFile *.inc	set filetype=pascal

An advantage is that you do not need to include // vim:ts=4:filetype=pascal at the beginning of each file.
By the way, your way of doing it should work, but the VIM newsgroup is IMHO a better place to ask such a question.

bartek



More information about the fpc-pascal mailing list