diff options
author | Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com> | 2024-01-03 14:58:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-03 19:58:21 +0100 |
commit | d94ca966ca6d85d3dd03c8b68ff6a4cbae4da1af (patch) | |
tree | 0e17a02634ee9c14b33259c9a1f1f42486aab4f6 /runtime/doc/syntax.txt | |
parent | 83ad2726ff56db70cb2da78e1e4ea0e09941c73b (diff) |
runtime(fortran): syntax and documentation updates (#13811)
closes: #13802
Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/doc/syntax.txt')
-rw-r--r-- | runtime/doc/syntax.txt | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index bc833b11fc..e3cac2e248 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1677,27 +1677,19 @@ placed prior to the :syntax on command. Unfortunately, the use of tabs will mean that the syntax file will not be able to detect incorrect margins. Syntax folding of Fortran files ~ -If you wish to use foldmethod=syntax, then you must first set the variable -fortran_fold with a command such as > +Vim will fold your file using foldmethod=syntax, if you set the variable +fortran_fold in your .vimrc with a command such as > :let fortran_fold=1 to instruct the syntax script to define fold regions for program units, that is main programs starting with a program statement, subroutines, function -subprograms, modules, submodules, and block data units. Block, interface, -associate, critical, type definition, and change team constructs will also be -folded. If you also set the variable fortran_fold_conditionals with a command -such as > +subprograms, modules, submodules, blocks of comment lines, and block data +units. Block, interface, associate, critical, type definition, and change team +constructs will also be folded. If you also set the variable +fortran_fold_conditionals with a command such as > :let fortran_fold_conditionals=1 then fold regions will also be defined for do loops, if blocks, select case, -select type, and select rank constructs. If you also set the variable -fortran_fold_multilinecomments with a command such as > - :let fortran_fold_multilinecomments=1 -then fold regions will also be defined for three or more consecutive comment -lines. Note that defining fold regions can be slow for large files. - -If fortran_fold, and possibly fortran_fold_conditionals and/or -fortran_fold_multilinecomments, have been set, then vim will fold your file. -Comments or blank lines placed between two program units are not folded -because they are seen as not belonging to any program unit. +select type, and select rank constructs. Note that defining fold regions can +be slow for large files. The syntax/fortran.vim script contains embedded comments that tell you how to comment and/or uncomment some lines to (a) activate recognition of some |