diff options
author | KillTheMule <KillTheMule@users.noreply.github.com> | 2016-05-03 21:16:53 +0200 |
---|---|---|
committer | KillTheMule <KillTheMule@users.noreply.github.com> | 2016-05-03 21:22:45 +0200 |
commit | 7b29dfc43a0220cfc20d657e68eeddaa0d1d3674 (patch) | |
tree | 5adde1502b16d953d6ef48cea485e4e3e7209d45 /runtime/doc/syntax.txt | |
parent | b634cfcc196fef0b17c48f9669c4e2eb7a1fcc26 (diff) | |
download | rneovim-7b29dfc43a0220cfc20d657e68eeddaa0d1d3674.tar.gz rneovim-7b29dfc43a0220cfc20d657e68eeddaa0d1d3674.tar.bz2 rneovim-7b29dfc43a0220cfc20d657e68eeddaa0d1d3674.zip |
vim-patch:256972a
Updated runtime files.
https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Missing files in runtime/doc: todo.txt, tags. Patch to runtime/doc/syntax.txt
was applied manually in part, for no discernible reason.
Diffstat (limited to 'runtime/doc/syntax.txt')
-rw-r--r-- | runtime/doc/syntax.txt | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 01bfc115a3..81ba639dbe 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.4. Last change: 2015 Nov 05 +*syntax.txt* For Vim version 7.4. Last change: 2015 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1433,34 +1433,28 @@ form, then > :let fortran_fixed_source=1 in your vimrc prior to the :syntax on command. -If the form of the source code depends upon the file extension, then it is -most convenient to set fortran_free_source in a ftplugin file. For more -information on ftplugin files, see |ftplugin|. For example, if all your -fortran files with an .f90 extension are written in free source form and the -rest in fixed source form, add the following code to your ftplugin file > - let s:extfname = expand("%:e") - if s:extfname ==? "f90" - let fortran_free_source=1 - unlet! fortran_fixed_source - else - let fortran_fixed_source=1 - unlet! fortran_free_source - endif -Note that this will work only if the "filetype plugin indent on" command -precedes the "syntax on" command in your vimrc file. +If the form of the source code depends, in a non-standard way, upon the file +extension, then it is most convenient to set fortran_free_source in a ftplugin +file. For more information on ftplugin files, see |ftplugin|. Note that this +will work only if the "filetype plugin indent on" command precedes the "syntax +on" command in your .vimrc file. + When you edit an existing fortran file, the syntax script will assume free source form if the fortran_free_source variable has been set, and assumes fixed source form if the fortran_fixed_source variable has been set. If neither of these variables have been set, the syntax script attempts to -determine which source form has been used by examining the first five columns -of the first 250 lines of your file. If no signs of free source form are -detected, then the file is assumed to be in fixed source form. The algorithm -should work in the vast majority of cases. In some cases, such as a file that -begins with 250 or more full-line comments, the script may incorrectly decide -that the fortran code is in fixed form. If that happens, just add a -non-comment statement beginning anywhere in the first five columns of the -first twenty five lines, save (:w) and then reload (:e!) the file. +determine which source form has been used by examining the file extension +using conventions common to the ifort, gfortran, Cray, NAG, and PathScale +compilers (.f, .for, .f77 for fixed-source, .f90, .f95, .f03, .f08 for +free-source). If none of this works, then the script examines the first five +columns of the first 500 lines of your file. If no signs of free source form +are detected, then the file is assumed to be in fixed source form. The +algorithm should work in the vast majority of cases. In some cases, such as a +file that begins with 500 or more full-line comments, the script may +incorrectly decide that the fortran code is in fixed form. If that happens, +just add a non-comment statement beginning anywhere in the first five columns +of the first twenty five lines, save (:w) and then reload (:e!) the file. Tabs in fortran files ~ Tabs are not recognized by the Fortran standards. Tabs are not a good idea in |