Skip to content

Commit 1758600

Browse files
authored
Merge pull request #1648 from vim-jp/hh-update-filetype
Update filetype.{txt,jax}
2 parents 93ee6f0 + fbab288 commit 1758600

File tree

2 files changed

+206
-2
lines changed

2 files changed

+206
-2
lines changed

doc/filetype.jax

Lines changed: 104 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*filetype.txt* For Vim バージョン 9.1. Last change: 2024 Apr 09
1+
*filetype.txt* For Vim バージョン 9.1. Last change: 2024 Jul 16
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -155,6 +155,7 @@ NOTE: Vi互換とは全てのオプションがグローバルであることを
155155
*.csh g:filetype_csh |ft-csh-syntax|
156156
*.dat g:filetype_dat
157157
*.def g:filetype_def
158+
*.dsp g:filetype_dsp
158159
*.f g:filetype_f |ft-forth-syntax|
159160
*.frm g:filetype_frm |ft-form-syntax|
160161
*.fs g:filetype_fs |ft-forth-syntax|
@@ -456,6 +457,18 @@ ASCIIDOC *ft-asciidoc-plugin*
456457
let asciidoc_fold_under_title = 0
457458
458459
460+
ARDUINO *ft-arduino-plugin*
461+
462+
デフォルトでは、Arduino IDE のデフォルト設定に従って、以下のオプションが設定さ
463+
れている: >
464+
465+
setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2
466+
467+
この動作を無効にするには、vimrc で以下の変数を設定する: >
468+
469+
let g:arduino_recommended_style = 0
470+
471+
459472
AWK *ft-awk-plugin*
460473

461474
@include のような、GNU Awk 固有の機能のサポートは、以下の設定で有効にできる: >
@@ -600,13 +613,37 @@ $lang メタコマンドで見つかった最初の名前、または最終的
600613
let g:freebasic_lang = "fblite"
601614
602615
616+
GDSCRIPT *ft-gdscript-plugin*
617+
618+
デフォルトでは、Godot の公式ドキュメントに基づいて、以下のオプションが設定され
619+
ている: >
620+
621+
setlocal noexpandtab softtabstop=0 shiftwidth=0
622+
623+
この動作を無効にするには、vimrc で以下の変数を設定する: >
624+
625+
let g:gdscript_recommended_style = 0
626+
627+
603628
GIT COMMIT *ft-gitcommit-plugin*
604629

605630
現在のコミットの差分をプレビューウィンドウに表示する :DiffGitCached というコマ
606631
ンドが提供されている。このコマンドを実行すると、その引数をつけて "git diff
607632
--cached" が実行される。
608633

609634

635+
GO *ft-go-plugin*
636+
637+
デフォルトでは、Golang の公式ドキュメントに基づいて、以下のオプションが設定さ
638+
れている: >
639+
640+
setlocal noexpandtab softtabstop=0 shiftwidth=0
641+
642+
この動作を無効にするには、vimrc で以下の変数を設定する: >
643+
644+
let g:go_recommended_style = 0
645+
646+
610647
GPROF *ft-gprof-plugin*
611648

612649
gprof ファイルタイププラグインは gprof のフラットプロファイルもしくはコールグ
@@ -617,6 +654,42 @@ gprof ファイルタイププラグインは gprof のフラットプロファ
617654
let g:no_gprof_maps = 1
618655
619656
657+
HARE *ft-hare*
658+
659+
このプラグインのテキストはかなり長いため、別ファイル |ft_hare.txt| に配置され
660+
ている: |ft_hare.txt|
661+
662+
663+
JAVA *ft-java-plugin*
664+
665+
変数 "g:ftplugin_java_source_path" が定義され、その値が拡張子 ".jar" または
666+
".zip" のファイル名である場合の例: >
667+
let g:ftplugin_java_source_path = '/path/to/src.jar'
668+
let g:ftplugin_java_source_path = '/path/to/src.zip'
669+
<
670+
そして、|zip| プラグインがすでに読み込まれている場合は、|gf| コマンドを使用し
671+
てアーカイブを開き、|n| コマンドを使用して選択したタイプを検索し、<Return> キー
672+
を使用してリストされたファイルを読み込むことができる。
673+
674+
Note Zip プラグインで読み込まれたバッファ内で "gf" コマンドを使用した場合の効
675+
果は、Zip プラグインのバージョンによって異なることに注意。Jar タイプのアーカイ
676+
ブをサポートしていない Zip プラグインのバージョンの場合は、対象の各 Jar アーカ
677+
イブに対して ".zip" 拡張子のシンボリックリンクを作成し、今後はそのようなファイ
678+
ルを変数に割り当てることを検討すること。
679+
680+
それ以外の場合、定義済み変数 "g:ftplugin_java_source_path" に対して、変数の値
681+
を先頭に追加することで、'path' オプションのローカル値がさらに変更される。例: >
682+
let g:ftplugin_java_source_path = $JDK_SRC_PATH
683+
let &l:path = g:ftplugin_java_source_path . ',' . &l:path
684+
<
685+
そして、"gf" コマンドを完全修飾型の上で使用することで、"path" からファイルを探
686+
し、それを読み込もうと試みることができる。
687+
688+
変数に新しい値を割り当てた後は、必ず、Java ファイルが読み込まれているバッファ
689+
から |FileType| イベントを手動でトリガーすること: >
690+
doautocmd FileType
691+
<
692+
620693
JSON-FORMAT *ft-json-plugin*
621694

622695
JSON ファイルタイプは、JSON のフォーマッティング (|gq| を使用) に 'formatexpr'
@@ -830,6 +903,11 @@ tex (LaTeX)。そうでなければ context か tex かを決定するために
830903
let g:tex_flavor = "latex"
831904
現在のところこれ以外のフォーマットは識別されない。
832905

906+
TYPST *ft-typst-plugin*
907+
908+
*g:typst_conceal*
909+
|TRUE| の場合、Typst ファイルタイププラグインは 'conceallevel' オプションを 2
910+
に設定する。
833911

834912
VIM *ft-vim-plugin*
835913

@@ -840,6 +918,31 @@ Vim ファイルタイププラグインは、[[ および ]] で関数の先頭
840918
let g:no_vim_maps = 1
841919
842920
921+
ZIG *ft-zig-plugin*
922+
923+
*g:zig_recommended_style*
924+
デフォルトでは、Zig の推奨スタイルに従って、以下のインデントオプションが設定さ
925+
れている (https://ziglang.org/documentation/master/): >
926+
927+
setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
928+
<
929+
この動作を無効にするには、|g:zig_recommended_style| を 0 に設定する: >
930+
931+
let g:zig_recommended_style = 0
932+
<
933+
*g:zig_std_dir*
934+
Zig 標準ライブラリへのパス。Zig |ftplugin||g:zig_std_dir| を読み取り、それ
935+
を Zig ファイルの 'path' に追加する。Zig 標準ライブラリが配置されている場所は、
936+
システムとインストール方法によって異なる。
937+
938+
`zig env` を使用すると |g:zig_std_dir| を自動的に設定できる: >
939+
940+
let g:zig_std_dir = json_decode(system('zig env'))['std_dir']
941+
<
942+
例えば、これを FileType |:autocmd| またはユーザー |ftplugin| に配置して、Zig
943+
ファイルが開かれたときにのみ読み込まれるようにできる。
944+
945+
843946
ZIMBU *ft-zimbu-plugin*
844947

845948
Zimbu ファイルタイププラグインは、[[ および ]] で関数の先頭および末尾に移動す

en/filetype.txt

Lines changed: 102 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*filetype.txt* For Vim version 9.1. Last change: 2024 Apr 09
1+
*filetype.txt* For Vim version 9.1. Last change: 2024 Jul 16
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -149,6 +149,7 @@ variables can be used to overrule the filetype used for certain extensions:
149149
*.csh g:filetype_csh |ft-csh-syntax|
150150
*.dat g:filetype_dat
151151
*.def g:filetype_def
152+
*.dsp g:filetype_dsp
152153
*.f g:filetype_f |ft-forth-syntax|
153154
*.frm g:filetype_frm |ft-form-syntax|
154155
*.fs g:filetype_fs |ft-forth-syntax|
@@ -452,6 +453,18 @@ To disable folding everything under the title use this: >
452453
let asciidoc_fold_under_title = 0
453454
454455
456+
ARDUINO *ft-arduino-plugin*
457+
458+
By default the following options are set, in accordance with the default
459+
settings of Arduino IDE: >
460+
461+
setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2
462+
463+
To disable this behavior, set the following variable in your vimrc: >
464+
465+
let g:arduino_recommended_style = 0
466+
467+
455468
AWK *ft-awk-plugin*
456469

457470
Support for features specific to GNU Awk, like @include, can be enabled by
@@ -610,13 +623,35 @@ any #lang directive overrides, use the following command: >
610623
let g:freebasic_lang = "fblite"
611624
612625
626+
GDSCRIPT *ft-gdscript-plugin*
627+
628+
By default the following options are set, based on Godot official docs: >
629+
630+
setlocal noexpandtab softtabstop=0 shiftwidth=0
631+
632+
To disable this behavior, set the following variable in your vimrc: >
633+
634+
let g:gdscript_recommended_style = 0
635+
636+
613637
GIT COMMIT *ft-gitcommit-plugin*
614638

615639
One command, :DiffGitCached, is provided to show a diff of the current commit
616640
in the preview window. It is equivalent to calling "git diff --cached" plus
617641
any arguments given to the command.
618642

619643

644+
GO *ft-go-plugin*
645+
646+
By default the following options are set, based on Golang official docs: >
647+
648+
setlocal noexpandtab softtabstop=0 shiftwidth=0
649+
650+
To disable this behavior, set the following variable in your vimrc: >
651+
652+
let g:go_recommended_style = 0
653+
654+
620655
GPROF *ft-gprof-plugin*
621656

622657
The gprof filetype plugin defines a mapping <C-]> to jump from a function
@@ -627,6 +662,43 @@ The mapping can be disabled with: >
627662
let g:no_gprof_maps = 1
628663
629664
665+
HARE *ft-hare*
666+
667+
Since the text for this plugin is rather long it has been put in a separate
668+
file: |ft_hare.txt|.
669+
670+
671+
JAVA *ft-java-plugin*
672+
673+
Whenever the variable "g:ftplugin_java_source_path" is defined and its value
674+
is a filename whose extension is either ".jar" or ".zip", e.g.: >
675+
let g:ftplugin_java_source_path = '/path/to/src.jar'
676+
let g:ftplugin_java_source_path = '/path/to/src.zip'
677+
<
678+
and the |zip| plugin has already been sourced, the |gf| command can be used to
679+
open the archive and the |n| command can be used to look for the selected type
680+
and the <Return> key can be used to load a listed file.
681+
682+
Note that the effect of using the "gf" command WITHIN a buffer loaded with the
683+
Zip plugin depends on the version of the Zip plugin. For the Zip plugin
684+
versions that do not support Jar type archives, consider creating symbolic
685+
links with the ".zip" extension for each Jar archive of interest and assigning
686+
any such file to the variable from now on.
687+
688+
Otherwise, for the defined variable "g:ftplugin_java_source_path", the local
689+
value of the 'path' option will be further modified by prefixing the value of
690+
the variable, e.g.: >
691+
let g:ftplugin_java_source_path = $JDK_SRC_PATH
692+
let &l:path = g:ftplugin_java_source_path . ',' . &l:path
693+
<
694+
and the "gf" command can be used on a fully-qualified type to look for a file
695+
in the "path" and to try to load it.
696+
697+
Remember to manually trigger the |FileType| event from a buffer with a Java
698+
file loaded in it each time after assigning a new value to the variable: >
699+
doautocmd FileType
700+
<
701+
630702
JSON-FORMAT *ft-json-plugin*
631703

632704
JSON filetype can be extended to use 'formatexpr' and "json.FormatExpr()"
@@ -836,6 +908,10 @@ You can change the default by defining the variable g:tex_flavor to the format
836908
let g:tex_flavor = "latex"
837909
Currently no other formats are recognized.
838910

911+
TYPST *ft-typst-plugin*
912+
913+
*g:typst_conceal*
914+
When |TRUE| the Typst filetype plugin will set the 'conceallevel' option to 2.
839915

840916
VIM *ft-vim-plugin*
841917

@@ -846,6 +922,31 @@ The mappings can be disabled with: >
846922
let g:no_vim_maps = 1
847923
848924
925+
ZIG *ft-zig-plugin*
926+
927+
*g:zig_recommended_style*
928+
By default the following indentation options are set, in accordance with Zig's
929+
recommended style (https://ziglang.org/documentation/master/): >
930+
931+
setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
932+
<
933+
To disable this behavior, set |g:zig_recommended_style| to 0: >
934+
935+
let g:zig_recommended_style = 0
936+
<
937+
*g:zig_std_dir*
938+
The path to the Zig standard library. The Zig |ftplugin| reads |g:zig_std_dir|
939+
and appends it to the 'path' for Zig files. Where the Zig standard library
940+
is located is system and installation method dependent.
941+
942+
One can automatically set |g:zig_std_dir| using `zig env`: >
943+
944+
let g:zig_std_dir = json_decode(system('zig env'))['std_dir']
945+
<
946+
This can, for example, be put in a FileType |:autocmd| or user |ftplugin| to
947+
only load when a Zig file is opened.
948+
949+
849950
ZIMBU *ft-zimbu-plugin*
850951

851952
The Zimbu filetype plugin defines mappings to move to the start and end of

0 commit comments

Comments
 (0)