Skip to content

Commit a9d912e

Browse files
committed
Update indent.{txt,jax}
1 parent 7b7be7b commit a9d912e

File tree

2 files changed

+29
-32
lines changed

2 files changed

+29
-32
lines changed

doc/indent.jax

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*indent.txt* For Vim バージョン 9.0. Last change: 2022 Oct 10
1+
*indent.txt* For Vim バージョン 9.0. Last change: 2023 Dec 05
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -715,14 +715,13 @@ Doループ ~
715715
付けされたほとんど任意の型の実行可能な文で(場合によっては多重に)終わるので、do
716716
ループは非構造的になる。これを正しくインデントするにはコンパイラ級の構文解析が
717717
必要になる。任意の型の実行可能文で終わるdoループを持っていたとしても、古いコー
718-
ドであればTidy (http://www.unb.ca/chem/ajit/f_tidy.htm) のように念入りに作られ
719-
たプログラムでインデントすることはできる。構造化do/continueループも、continue
720-
文がdoループを終了する以外の目的でも使用されるので、インデントせずに残される。
721-
Tidyのようなプログラムは構造化do/continueループをdo/enddo形式に変換することが
722-
できる。do/enddoタイプのdoループならばインデントすることができる。do/enddoの形
723-
の構造化されたループしか使わないのならば、.vimrcで以下のようにfortran_do_enddo
724-
変数を設定してそのことを宣言するべきである: >
725-
718+
ドであればTidyのように念入りに作られたプログラムでインデントすることはできる。
719+
構造化do/continueループも、continue文がdoループを終了する以外の目的でも使用さ
720+
れるので、インデントせずに残される。Tidyのようなプログラムは構造化do/continue
721+
ループをdo/enddo形式に変換することができる。do/enddoタイプのdoループならばイン
722+
デントすることができる。do/enddoの形の構造化されたループしか使わないのならば、
723+
.vimrcで以下のようにfortran_do_enddo変数を設定してそのことを宣言するべきである:
724+
>
726725
let fortran_do_enddo=1
727726
728727
このようにすればdoループはインデントされる。例えば拡張子が.f90 であるファイル
@@ -736,14 +735,14 @@ Tidyのようなプログラムは構造化do/continueループをdo/enddo形式
736735

737736
プログラム単位 ~
738737
プログラム単位 (サブルーチン、関数、モジュール、プログラムブロック) のインデン
739-
トは初期設定では有効になっている。軽くてスクリーン幅指向のインデントスタイルが
740-
好みなら無効化することができる。すべての Fortran ファイルでプログラム単位のイ
741-
ンデントを無効化するにはグローバル変数の fortran_indent_less を .vimrc で設定
742-
する。 >
738+
トは、変数 fortran_indent_more を設定すると増やすことができ、変数
739+
fortran_indent_less を設定すると減らすことができる。これらの変数は、すべての
740+
fortran ファイルに対して .vimrc 内に以下のように設定することができる >
743741
744742
let fortran_indent_less=1
745743
746-
バッファ単位で無効化したい場合はバッファローカル変数を設定する。 >
744+
対応するバッファローカル変数を以下のように設定することで、より細かいレベルの制
745+
御が可能になる >
747746
748747
let b:fortran_indent_less=1
749748

en/indent.txt

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*indent.txt* For Vim version 9.0. Last change: 2022 Oct 10
1+
*indent.txt* For Vim version 9.0. Last change: 2023 Dec 05
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -715,7 +715,7 @@ FORTRAN *ft-fortran-indent*
715715
Block if, select case, where, and forall constructs are indented. So are
716716
type, interface, associate, block, and enum constructs. The indenting of
717717
subroutines, functions, modules, and program blocks is optional. Comments,
718-
labelled statements and continuation lines are indented if the Fortran is in
718+
labeled statements, and continuation lines are indented if the Fortran is in
719719
free source form, whereas they are not indented if the Fortran is in fixed
720720
source form because of the left margin requirements. Hence manual indent
721721
corrections will be necessary for labelled statements and continuation lines
@@ -724,17 +724,16 @@ used for the detection of source format see |ft-fortran-syntax|.
724724

725725
Do loops ~
726726
All do loops are left unindented by default. Do loops can be unstructured in
727-
Fortran with (possibly multiple) loops ending on a labelled executable
727+
Fortran with (possibly multiple) loops ending on a labeled executable
728728
statement of almost arbitrary type. Correct indentation requires
729-
compiler-quality parsing. Old code with do loops ending on labelled statements
730-
of arbitrary type can be indented with elaborate programs such as Tidy
731-
(http://www.unb.ca/chem/ajit/f_tidy.htm). Structured do/continue loops are
732-
also left unindented because continue statements are also used for purposes
733-
other than ending a do loop. Programs such as Tidy can convert structured
734-
do/continue loops to the do/enddo form. Do loops of the do/enddo variety can
735-
be indented. If you use only structured loops of the do/enddo form, you should
736-
declare this by setting the fortran_do_enddo variable in your .vimrc as
737-
follows >
729+
compiler-quality parsing. Old code with do loops ending on labeled statements
730+
of arbitrary type can be indented with elaborate programs such as Tidy.
731+
Structured do/continue loops are also left unindented because continue
732+
statements are used for purposes other than ending a do loop. Programs such
733+
as Tidy can convert structured do/continue loops to the do/enddo form. Do
734+
loops of the do/enddo variety can be indented. If you use only structured
735+
loops of the do/enddo form, you should declare this by setting the
736+
fortran_do_enddo variable in your .vimrc as follows >
738737
739738
let fortran_do_enddo=1
740739
@@ -748,15 +747,14 @@ to get do loops indented in .f90 files and left alone in Fortran files with
748747
other extensions such as .for.
749748

750749
Program units ~
751-
The indenting of program units (subroutines, functions, modules, and program
752-
blocks) is enabled by default but can be suppressed if a lighter, screen-width
753-
preserving indent style is desired. To suppress the indenting of program
754-
units for all fortran files set the global fortran_indent_less variable in
755-
your .vimrc as follows >
750+
Indenting of program units (subroutines, functions, modules, and program
751+
blocks) can be increased by setting the variable fortran_indent_more and can
752+
be decreased by setting the variable fortran_indent_less. These variables
753+
can be set for all fortran files in your .vimrc as follows >
756754
757755
let fortran_indent_less=1
758756
759-
A finer level of suppression can be achieved by setting the corresponding
757+
A finer level of control can be achieved by setting the corresponding
760758
buffer-local variable as follows >
761759
762760
let b:fortran_indent_less=1

0 commit comments

Comments
 (0)