diff options
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r-- | runtime/ftplugin/confini.vim | 10 | ||||
-rw-r--r-- | runtime/ftplugin/fortran.vim | 8 |
2 files changed, 15 insertions, 3 deletions
diff --git a/runtime/ftplugin/confini.vim b/runtime/ftplugin/confini.vim new file mode 100644 index 0000000000..310e046353 --- /dev/null +++ b/runtime/ftplugin/confini.vim @@ -0,0 +1,10 @@ +" Vim filetype plugin file +" Language: confini + +" Quit if a ftplugin file was already loaded +if exists("b:did_ftplugin") + finish +endif + +" Use the cfg plugin, it's similar enough. +runtime! ftplugin/cfg.vim diff --git a/runtime/ftplugin/fortran.vim b/runtime/ftplugin/fortran.vim index 26dc90a184..8f5b243b82 100644 --- a/runtime/ftplugin/fortran.vim +++ b/runtime/ftplugin/fortran.vim @@ -1,6 +1,6 @@ " Vim settings file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66) -" Version: (v53) 2021 April 06 +" Version: (v53) 2021 April 06 (updated 2022 May 22) " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/> " Usage: For instructions, do :help fortran-plugin from Vim " Credits: @@ -105,12 +105,13 @@ if !exists("b:match_words") let s:notselect = '\%(\<select\s\+\)\@<!' let s:notelse = '\%(\<end\s\+\|\<else\s\+\)\@<!' let s:notprocedure = '\%(\s\+procedure\>\)\@!' + let s:nothash = '\%(^\s*#\s*\)\@<!' let b:match_ignorecase = 1 let b:match_words = \ '(:),' . \ '\<select\s*case\>:' . s:notselect. '\<case\>:\<end\s*select\>,' . \ s:notelse . '\<if\s*(.\+)\s*then\>:' . - \ '\<else\s*\%(if\s*(.\+)\s*then\)\=\>:\<end\s*if\>,'. + \ s:nothash . '\<else\s*\%(if\s*(.\+)\s*then\)\=\>:' . s:nothash . '\<end\s*if\>,'. \ 'do\s\+\(\d\+\):\%(^\s*\)\@<=\1\s,'. \ s:notend . '\<do\>:\<end\s*do\>,'. \ s:notelse . '\<where\>:\<elsewhere\>:\<end\s*where\>,'. @@ -122,7 +123,8 @@ if !exists("b:match_words") \ s:notend . '\<subroutine\>:\<end\s*subroutine\>,'. \ s:notend . '\<function\>:\<end\s*function\>,'. \ s:notend . '\<module\>' . s:notprocedure . ':\<end\s*module\>,'. - \ s:notend . '\<program\>:\<end\s*program\>' + \ s:notend . '\<program\>:\<end\s*program\>,'. + \ '\%(^\s*\)\@<=#\s*if\%(def\|ndef\)\=\>:\%(^\s*\)\@<=#\s*\%(elif\|else\)\>:\%(^\s*\)\@<=#\s*endif\>' endif " File filters for :browse e |