summaryrefslogtreecommitdiffstats
path: root/runtime/doc/syntax.txt
diff options
context:
space:
mode:
authorAjit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>2023-12-18 08:53:21 +0100
committerChristian Brabandt <cb@256bit.org>2023-12-18 08:55:44 +0100
commit71cbe8e17a8c0c29b91943a7e9da596d718c79cf (patch)
tree7fda12b4c207498eba0c28f3a036ca7796a9a691 /runtime/doc/syntax.txt
parentb5011089860b24f60db1a74f91c0adf8897c4401 (diff)
runtime(fortan): update fortran syntax rules and doc notes
Update to the Fortran 2023 standard. Reorganize some code to reflect the dropping of dialect support in the previous commit. Minor improvements. closes: #13712 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.txt35
1 files changed, 18 insertions, 17 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 74087620f8..679654efa8 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 9.0. Last change: 2023 Dec 09
+*syntax.txt* For Vim version 9.0. Last change: 2023 Dec 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1589,13 +1589,14 @@ edit F# or Fortran at all, use this in your startup vimrc: >
FORTRAN *fortran.vim* *ft-fortran-syntax*
Default highlighting and dialect ~
-Highlighting appropriate for Fortran 2008 is used by default. This choice
-should be appropriate for most users most of the time because Fortran 2008 is
-almost a superset of previous versions (Fortran 2003, 95, 90, and 77). A
-small number of features new to Fortran 2018 and Fortran 2023 are supported
-and the complete transition to Fortran 2023 will be completed in the future.
-A few legacy constructs deleted or declared obsolescent in recent Fortran
-standards are highlighted as todo items.
+Vim highlights according to Fortran 2023 (the most recent standard) by
+default. This choice should be appropriate for most users most of the time
+because Fortran 2023 is almost a superset of previous versions (Fortran 2018,
+2008, 2003, 95, 90, and 77). A small number of features new to Fortran 2018
+and Fortran 2023 may have been omitted at present; the transition to Fortran
+2023 will be completed in the near future. A few legacy constructs deleted or
+declared obsolescent in recent Fortran standards are highlighted as todo
+items.
The syntax script no longer supports Fortran dialects. The variable
fortran_dialect is now silently ignored. Since computers are much faster now,
@@ -1605,7 +1606,7 @@ Fortran source code form ~
Fortran code can be in either fixed or free source form. Note that the
syntax highlighting will not be correct if the form is incorrectly set.
-When you create a new fortran file, the syntax script assumes fixed source
+When you create a new Fortran file, the syntax script assumes fixed source
form. If you always use free source form, then >
:let fortran_free_source=1
in your .vimrc prior to the :syntax on command. If you always use fixed
@@ -1619,10 +1620,10 @@ 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
+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
+fixed source form if the fortran_fixed_source variable has been set. Suppose
+neither of these variables have been set. In that case, the syntax script attempts to
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
@@ -1657,17 +1658,17 @@ command such as >
:let fortran_vendor_intrinsics=1
placed prior to the :syntax on command.
-Tabs in fortran files ~
+Tabs in Fortran files ~
Tabs are not recognized by the Fortran standards. Tabs are not a good idea in
-fixed format fortran source code which requires fixed column boundaries.
+fixed format Fortran source code which requires fixed column boundaries.
Therefore, tabs are marked as errors. Nevertheless, some programmers like
-using tabs. If your fortran files contain tabs, then you should set the
+using tabs. If your Fortran files contain tabs, then you should set the
variable fortran_have_tabs in your .vimrc with a command such as >
:let fortran_have_tabs=1
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 ~
+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 >
:let fortran_fold=1
@@ -1700,7 +1701,7 @@ Parenthesis checking does not catch too few closing parentheses. Hollerith
strings are not recognized. Some keywords may be highlighted incorrectly
because Fortran90 has no reserved words.
-For further information related to fortran, see |ft-fortran-indent| and
+For further information related to Fortran, see |ft-fortran-indent| and
|ft-fortran-plugin|.
FREEBASIC *freebasic.vim* *ft-freebasic-syntax*