DOKK / manpages / debian 10 / findent / findent.1.en
FINDENT(1) User Commands FINDENT(1)

findent - Indents and optionally converts Fortran program source

findent [OPTION]...

Findent reads from STDIN and writes to STDOUT.

Findent indents a Fortran source. Findent uses various kinds of indentations, see OPTIONS. Findent can convert from fixed form to free form, and can supplement single END statements, see 'Refactor' below. Comment lines with '!' in column one are not indented.
You can correct findent related indenting errors by inserting comment lines:
! findentfix: <fortran statement>
where <fortran statement> is for example DO, END, WHERE() etcetera. Findent will adjust the indentation according to <fortran statement>.
Errors in OPTIONS are silently ignored.

Below: <n> denotes an unsigned decimal number. In the long options, you can replace '_' with '-'.

print this text
print man page
print some background information
prints findent version
guess free or fixed, prints 'fixed' or 'free' and exits
(0/1) 1: move statement labels to start of line (default:1)
(only for free format)
prints computed indentation of last line
(for usage with vim)
prints line number of last line usable
as start for indenting(for usage with vim)
determine automatically input format (free or fixed)
force input format fixed (default: auto)
force input format free (default: auto)
do not change indent (useful in combination with -R)
use only first <n> characters of each line default=0: take whole lines
same as above, but use gfortran convention for counting the characters with tabbed lines
example: --input_line_length=72g
force free format output
output format same is input format
refactor procedures and modules: a single 'end'
is, if possible, replaced by
'end subroutine <name>' or
'end function <name>' or
'end program <name>' or
'end blockdata <name>' or
'end module <name>'
where <name> is the name of the appropriate block
same as -Rr, but 'SUBROUTINE' in stead of 'subroutine' etc

starting indent (default:0)
determine starting indent from first line
all indents except I,c,C,e (default: 3)
ASSOCIATE indent
BLOCK indent
DO indent
IF indent
ENUM indent
FORALL indent
INTERFACE indent
MODULE indent
FUNCTION and
SUBROUTINE indent
SELECT indent
TYPE indent
WHERE indent
CRITICAL indent
restart indent after CONTAINS
continuation indent except
for lines starting with '&'
free to free only
continuation lines not preceded
by '&' are untouched
free to free only
next defaults are: all - all/2
CASE negative indent
CONTAINS negative indent
ENTRY negative indent

outputs directions to use findent in (g)vim
outputs file 'fortran.vim', see --vim_help
outputs file 'findent.vim', see --vim_help

outputs directions to use findent in gedit
outputs script 'findent-gedit', see --gedit_help
outputs file 'findent.plugin', see --gedit_help
outputs file 'python.py', see --gedit_help

outputs directions to use findent in emacs
outputs script 'findent.el', see --emacs_help

indent: findent < in.f > out.f
findent -i2 -r0 < in.f > out.f convert: findent -ofree < prog.f > prog.f90 refactor 'end': findent -Rr < in.f90 > out.f90

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

2018 findent-2.8.2