Hello,
The attachment is a patch for filetype.vim to improve the determination
of *.pro files.
If the pro file is a cpp file, we think that the second line is a
function prototype which ends with a ";". However, IDL source file may
also put a single ";" in the second line as comment just as many library
files shipped with the IDL interpreter do. These IDL source files may
also be regarded as cpp files by vim. This patch will fix this problem.
Regards,
Hong Xu
03/19/2011
--
You received this message from the "vim_dev" 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
diff -r 3adc6dd2d122 runtime/filetype.vim
--- a/runtime/filetype.vim Thu Mar 03 15:01:30 2011 +0100
+++ b/runtime/filetype.vim Sat Mar 19 16:55:42 2011 +0800
@@ -872,7 +872,7 @@
" Cproto files have a comment in the first line and a function prototype in
" the second line, it always ends in ";". Indent files may also have
" comments, thus we can't match comments to see the difference.
- if getline(2) =~ ';$'
+ if getline(2) =~ '.\+;$'
setf cpp
else
exe 'setf ' . a:default