Hi Bram,
I've created a patch to improve Objective-C filetype detection in ".m"
and ".mm" file. Could you check the patch?
Modern Objective-C code uses "@import" instead of "#include" or "#import".
http://clang.llvm.org/docs/Modules.html#objective-c-import-declaration
Regards,
Kazuki
Problem: Fail to detect modern Objective-C code.
Solution: Add @import detector
Files: runtime/filetype.vim
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1168,7 +1168,7 @@ func! s:FTm()
let n = 1
while n < 10
let line = getline(n)
- if line =~ '^\s*\(#\s*\(include\|import\)\>\|/\*\|//\)'
+ if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\|//\)'
setf objc
return
endif
@@ -1336,7 +1336,7 @@ func! s:FTmm()
let n = 1
while n < 10
let line = getline(n)
- if line =~ '^\s*\(#\s*\(include\|import\)\>\|/\*\)'
+ if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)'
setf objcpp
return
endif