Home Explore Blog CI



neovim

15th chunk of `runtime/doc/syntax.txt`
8511ce30942fb4573033cb5b40fa698d98a0f702e534803d0000000100000fa2
 by
J.A.M. Vermaseren, CAN, Netherlands, 1991.

If you want to include your own changes to the default colors, you have to
redefine the following syntax groups:

    - formConditional
    - formNumber
    - formStatement
    - formHeaderStatement
    - formComment
    - formPreProc
    - formDirective
    - formType
    - formString

Note that the form.vim syntax file implements FORM preprocessor commands and
directives per default in the same syntax group.

A predefined enhanced color mode for FORM is available to distinguish between
header statements and statements in the body of a FORM program.  To activate
this mode define the following variable in your vimrc file >

	:let form_enhanced_color=1

The enhanced mode also takes advantage of additional color features for a dark
gvim display.  Here, statements are colored LightYellow instead of Yellow, and
conditionals are LightBlue for better distinction.

Both Visual Basic and FORM use the extension ".frm".  To detect which one
should be used, Vim checks for the string "VB_Name" in the first five lines of
the file.  If it is found, filetype will be "vb", otherwise "form".

If the automatic detection doesn't work for you or you only edit, for
example, FORM files, use this in your startup vimrc: >
   :let filetype_frm = "form"


FORTH						*forth.vim* *ft-forth-syntax*

Files matching "*.f" could be Fortran or Forth and those matching "*.fs" could
be F# or Forth.  If the automatic detection doesn't work for you, or you don't
edit F# or Fortran at all, use this in your startup vimrc: >
   :let filetype_f  = "forth"
   :let filetype_fs = "forth"


FORTRAN					*fortran.vim* *ft-fortran-syntax*

Default highlighting and dialect ~
Vim highlights according to Fortran 2023 (the most recent standard). 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, 77, and 66).  A few legacy constructs deleted or declared obsolescent,
respectively, in recent Fortran standards are highlighted as errors and todo
items.

The syntax script no longer supports Fortran dialects.  The variable
fortran_dialect is now silently ignored.  Since computers are much faster now,
the variable fortran_more_precise is no longer needed and is silently ignored.

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
form.  If you always use free source form, then >
    :let fortran_free_source=1
If you always use fixed source form, then >
    :let fortran_fixed_source=1

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.  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 free-source).  No default is used for the .fpp and .ftn file extensions
because different compilers treat them differently. 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

Title: FORM, FORTH, and Fortran Syntax Configuration
Summary
Configuration options for FORM, including syntax groups and enhanced color modes, plus automatic file type detection using the 'VB_Name' string. For FORTH, dealing with filename extension conflicts with Fortran and F#. Fortran configuration highlights source code form, choosing between fixed and free source form and the deprecated 'fortran_dialect' variable.