Add OpenFOAM parser

This commit is contained in:
Elwardi 2021-12-14 13:45:56 +01:00 committed by Stephan Seitz
parent 50fee51d35
commit 16e77495c4
9 changed files with 131 additions and 0 deletions

13
after/ftdetect/foam.vim Normal file
View file

@ -0,0 +1,13 @@
" Last Change: 2021 Dec 13
function! s:foamFile(path)
let l:lines = getline(1, 10)
for line in lines
if match(line, 'FoamFile') >= 0
set filetype=foam
endif
endfor
endfunction
autocmd BufNewFile,BufRead * call s:foamFile(expand("%"))
autocmd FileType cpp call s:foamFile(expand("%"))