Skip to content

Update filetype.{txt,jax} #1469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 37 additions & 3 deletions doc/filetype.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*filetype.txt* For Vim バージョン 9.1. Last change: 2023 Dec 05
*filetype.txt* For Vim バージョン 9.1. Last change: 2024 Feb 14


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -154,6 +154,7 @@ NOTE: Vi互換とは全てのオプションがグローバルであることを
*.cls g:filetype_cls
*.csh g:filetype_csh |ft-csh-syntax|
*.dat g:filetype_dat
*.def g:filetype_def
*.f g:filetype_f |ft-forth-syntax|
*.frm g:filetype_frm |ft-form-syntax|
*.fs g:filetype_fs |ft-forth-syntax|
Expand All @@ -175,6 +176,7 @@ NOTE: Vi互換とは全てのオプションがグローバルであることを
*.sh g:bash_is_sh |ft-sh-syntax|
*.tex g:tex_flavor |ft-tex-plugin|
*.typ g:filetype_typ
*.v g:filetype_v
*.w g:filetype_w |ft-cweb-syntax|

いくつかのファイル形式のグローバル変数はファイル形式を検知できなかったときのみ
Expand Down Expand Up @@ -496,7 +498,7 @@ g:changelog_new_date_format
%% 一つの '%' が入る
%d 上記で定義した日付
%u 上記で定義したユーザーの名前
%p b:changelog_entry_prefix の結果
%p b:changelog_entry_prefix の結果
%c 作成後のカーソルの位置
デフォルトは "%d %u\n\n\t* %p%c\n\n"。これは次のよう
になる ( | はカーソルの位置を示している。しかし、行頭
Expand All @@ -508,7 +510,7 @@ g:changelog_new_date_format
g:changelog_new_entry_format
アイテムを作成するときの書式。
次の特別な文字が使える:
%p b:changelog_entry_prefix の結果
%p b:changelog_entry_prefix の結果
%c 作成後のカーソルの位置
デフォルトは "\t*\c"。これは次のようになる >
| * prefix|
Expand Down Expand Up @@ -552,6 +554,18 @@ b:changelog_entry_prefix
ムを加える。なければ新しいエントリとアイテムをファイルの先頭に加える。


ASCIIDOC *ft-asciidoc-plugin*

|folding| を有効にするには、これを使用する: >
let g:asciidoc_folding = 1

折り畳まれたヘッダーのネストを無効にするには、これを使用する: >
let g:asciidoc_foldnested = 0

タイトルの下のすべてを折りたたむことを無効にするには、これを使用する: >
let asciidoc_fold_under_title = 0


FORTRAN *ft-fortran-plugin*

オプション:
Expand Down Expand Up @@ -600,6 +614,18 @@ gprof ファイルタイププラグインは gprof のフラットプロファ
let g:no_gprof_maps = 1


JSON-FORMAT *ft-json-plugin*

JSON ファイルタイプは、JSON のフォーマッティング (|gq| を使用) に 'formatexpr'
および "json.FormatExpr()" 関数を使用するように拡張できる。

次の行を $HOME/.vim/ftplugin/json.vim に追加する: >

vim9script
import autoload 'dist/json.vim'
setl formatexpr=json.FormatExpr()


MAIL *ft-mail-plugin*

オプション:
Expand Down Expand Up @@ -761,6 +787,14 @@ RESTRUCTUREDTEXT *ft-rst-plugin*
let g:rst_style = 1


RNOWEB *ft-rnoweb-plugin*

'formatexpr' オプションは、R コードと LaTeX コードに対して異なる値で動的に設定
される。'formatexpr' を設定しないことを希望する場合は、|vimrc| に以下を追加す
る: >
let rnw_dynamic_comments = 0


RPM SPEC *ft-spec-plugin*

このプラグインに関する説明は非常に多いので、別のファイル |pi_spec.txt| に記述
Expand Down
40 changes: 37 additions & 3 deletions en/filetype.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 9.1. Last change: 2023 Dec 05
*filetype.txt* For Vim version 9.1. Last change: 2024 Feb 14


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -148,6 +148,7 @@ variables can be used to overrule the filetype used for certain extensions:
*.cls g:filetype_cls
*.csh g:filetype_csh |ft-csh-syntax|
*.dat g:filetype_dat
*.def g:filetype_def
*.f g:filetype_f |ft-forth-syntax|
*.frm g:filetype_frm |ft-form-syntax|
*.fs g:filetype_fs |ft-forth-syntax|
Expand All @@ -169,6 +170,7 @@ variables can be used to overrule the filetype used for certain extensions:
*.sh g:bash_is_sh |ft-sh-syntax|
*.tex g:tex_flavor |ft-tex-plugin|
*.typ g:filetype_typ
*.v g:filetype_v
*.w g:filetype_w |ft-cweb-syntax|

For a few filetypes the global variable is used only when the filetype could
Expand Down Expand Up @@ -494,7 +496,7 @@ g:changelog_new_date_format
%% insert a single '%' character
%d insert the date from above
%u insert the user from above
%p insert result of b:changelog_entry_prefix
%p insert result of b:changelog_entry_prefix
%c where to position cursor when done
The default is "%d %u\n\n\t* %p%c\n\n", which produces
something like (| is where cursor will be, unless at
Expand All @@ -508,7 +510,7 @@ g:changelog_new_entry_format
The format used when creating a new entry.
The following table describes special tokens in the
string:
%p insert result of b:changelog_entry_prefix
%p insert result of b:changelog_entry_prefix
%c where to position cursor when done
The default is "\t*%c", which produces something
similar to >
Expand Down Expand Up @@ -562,6 +564,18 @@ under it. If not found, a new entry and item is prepended to the beginning of
the Changelog.


ASCIIDOC *ft-asciidoc-plugin*

To enable |folding| use this: >
let g:asciidoc_folding = 1

To disable nesting of folded headers use this: >
let g:asciidoc_foldnested = 0

To disable folding everything under the title use this: >
let asciidoc_fold_under_title = 0


FORTRAN *ft-fortran-plugin*

Options:
Expand Down Expand Up @@ -610,6 +624,18 @@ The mapping can be disabled with: >
let g:no_gprof_maps = 1


JSON-FORMAT *ft-json-plugin*

JSON filetype can be extended to use 'formatexpr' and "json.FormatExpr()"
function for json formatting (using |gq|).

Add following lines to $HOME/.vim/ftplugin/json.vim: >

vim9script
import autoload 'dist/json.vim'
setl formatexpr=json.FormatExpr()


MAIL *ft-mail-plugin*

Options:
Expand Down Expand Up @@ -767,6 +793,14 @@ To enable this behavior, set the following variable in your vimrc: >
let g:rst_style = 1


RNOWEB *ft-rnoweb-plugin*

The 'formatexpr' option is set dynamically with different values for R code
and for LaTeX code. If you prefer that 'formatexpr' is not set, add to your
|vimrc|: >
let rnw_dynamic_comments = 0


RPM SPEC *ft-spec-plugin*

Since the text for this plugin is rather long it has been put in a separate
Expand Down