1
- *syntax.txt* For Vim バージョン 7.4. Last change: 2014 Sep 27
1
+ *syntax.txt* For Vim バージョン 7.4. Last change: 2016 Jan 28
2
2
3
3
4
4
VIMリファレンスマニュアル by Bram Moolenaar
@@ -210,7 +210,8 @@ NOTE: 長い行があって表示が遅く、構文ハイライトをオフに
210
210
プそれ自体は、色や属性を指定するものではない。
211
211
212
212
ハイライトや構文グループの名前はASCII文字、数字、アンダースコアだけでつけなけ
213
- ればならない。正規表現では: "[a-zA-Z0-9_]*"
213
+ ればならない。正規表現では: "[a-zA-Z0-9_]*" しかしそれ以外の文字を使ってもVim
214
+ はエラーを出力しない。
214
215
215
216
各ユーザーが好みの色セットを使用できるように、多くの言語に共通するハイライトグ
216
217
ループには優先名が与えられている。推奨されているグループ名は以下のとおり(構文
@@ -723,6 +724,22 @@ UTF-8 を使用するが、代わりに UTF-16 や UTF-32 を使うようにす
723
724
Note: UTF-32 か UTF-16 でエンコードされたドキュメントはいくつかのメジャーブラ
724
725
ウザで互換性の問題があることが知られている。
725
726
727
+ *g:html_font*
728
+ Default: "monospace"
729
+ You can specify the font or fonts used in the converted document using
730
+ g:html_font. If this option is set to a string, then the value will be
731
+ surrounded with single quotes. If this option is set to a list then each list
732
+ item is surrounded by single quotes and the list is joined with commas. Either
733
+ way, "monospace" is added as the fallback generic family name and the entire
734
+ result used as the font family (using CSS) or font face (if not using CSS).
735
+ Examples: >
736
+
737
+ " font-family: 'Consolas', monospace;
738
+ :let g:html_font = "Consolas"
739
+
740
+ " font-family: 'DejaVu Sans Mono', 'Consolas', monospace;
741
+ :let g:html_font = ["DejaVu Sans Mono", "Consolas"]
742
+ <
726
743
*convert-to-XML* *convert-to-XHTML* *g:html_use_xhtml*
727
744
初期設定: 0
728
745
0 なら、標準 HTML 4.01 を生成する (可能なら strict)。
@@ -1038,7 +1055,8 @@ CPP *cpp.vim* *ft-cpp-syntax*
1038
1055
大部分は | ft-c-syntax | と同じ。
1039
1056
1040
1057
変数 強調表示 ~
1041
- cpp_no_c11 C++11 標準のアイテムを強調表示しない
1058
+ cpp_no_cpp11 C++11 標準のアイテムを強調表示しない
1059
+ cpp_no_cpp14 C++14 標準のアイテムを強調表示しない
1042
1060
1043
1061
1044
1062
CSH *csh.vim* *ft-csh-syntax*
@@ -1102,6 +1120,16 @@ iniファイルをハイライトする。ただし次をvimrcファイルに書
1102
1120
:let enforce_freedesktop_standard = 1
1103
1121
1104
1122
1123
+ DIFF *diff.vim*
1124
+
1125
+ The diff highlighting normally finds translated headers. This can be slow if
1126
+ there are very long lines in the file. To disable translations: >
1127
+
1128
+ :let diff_translations = 0
1129
+
1130
+ Also see | diff-slow | .
1131
+
1132
+
1105
1133
DIRCOLORS *dircolors.vim* *ft-dircolors-syntax*
1106
1134
1107
1135
dircolorsユーティリティ用のハイライト定義には、Slackware GNU/Linuxディストリ
@@ -1380,22 +1408,28 @@ Fortran のソースコードには固定形式と自由形式が有る。形式
1380
1408
:let fortran_fixed_source=1
1381
1409
これも.vimrcでコマンド:syntaxを実行する前に行う必要がある。
1382
1410
1383
- ソースコードの形式がファイル拡張子によって決定できる場合には、ftpluginファイル
1384
- の1つでfortran_free_sourceを設定すると便利になる。ftpluginファイルについての詳
1385
- 細は| ftplugin | を参照のこと。例えば、拡張子.f90を持つファイルについては全て自由
1386
- 形式として扱い、それ以外のものは固定形式とする場合には、次のコードをftplugin
1387
- ファイルに記述すれば良い。 >
1388
- let s:extfname = expand("%:e")
1389
- if s:extfname ==? "f90"
1390
- let fortran_free_source=1
1391
- unlet! fortran_fixed_source
1392
- else
1393
- let fortran_fixed_source=1
1394
- unlet! fortran_free_source
1395
- endif
1396
- これは.vimrcで "syntax on" より前に "filetype plugin indent on" が書かれていな
1397
- いと機能しないことに注意。
1398
-
1411
+ If the form of the source code depends, in a non-standard way, upon the file
1412
+ extension, then it is most convenient to set fortran_free_source in a ftplugin
1413
+ file. For more information on ftplugin files, see | ftplugin | . Note that this
1414
+ will work only if the "filetype plugin indent on" command precedes the "syntax
1415
+ on" command in your .vimrc file.
1416
+
1417
+ When you edit an existing fortran file, the syntax script will assume free
1418
+ source form if the fortran_free_source variable has been set, and assumes
1419
+ fixed source form if the fortran_fixed_source variable has been set. If
1420
+ neither of these variables have been set, the syntax script attempts to
1421
+ determine which source form has been used by examining the file extension
1422
+ using conventions common to the ifort, gfortran, Cray, NAG, and PathScale
1423
+ compilers (.f, .for, .f77 for fixed-source, .f90, .f95, .f03, .f08 for
1424
+ free-source). If none of this works, then the script examines the first five
1425
+ columns of the first 500 lines of your file. If no signs of free source form
1426
+ are detected, then the file is assumed to be in fixed source form. The
1427
+ algorithm should work in the vast majority of cases. In some cases, such as a
1428
+ file that begins with 500 or more full-line comments, the script may
1429
+ incorrectly decide that the fortran code is in fixed form. If that happens,
1430
+ just add a non-comment statement beginning anywhere in the first five columns
1431
+ of the first twenty five lines, save (:w) and then reload (:e!) the file.
1432
+ {参考用の旧訳:
1399
1433
既存のFortranファイルを編集する時には、変数fortran_free_sourceが設定されていれ
1400
1434
ば構文ファイルは自由形式のソースであると仮定し、変数fortran_fixed_sourceが設定
1401
1435
されていれば固定形式のソースであると仮定する。どちらも設定されていないときに
@@ -1406,6 +1440,7 @@ Fortran のソースコードには固定形式と自由形式が有る。形式
1406
1440
るようなファイルでは、構文ファイルが固定形式コードであると誤った判断をしてしま
1407
1441
うだろう。そのような場合には、ファイルの先頭250行の行頭5桁のどこかに、コメント
1408
1442
以外の命令文を追加し、ファイルの保存 (:w) そして再読込 (:e!) を行えば良い。
1443
+ :旧訳ここまで}
1409
1444
1410
1445
Fortranファイル内のタブ文字 ~
1411
1446
標準のFortranではタブ文字は認識されない。固定桁位置での境界を必要とする固定形
@@ -3105,6 +3140,7 @@ g:vimsyn_embed オプションは、どの外部スクリプト言語の埋め
3105
3140
定する。 >
3106
3141
3107
3142
g:vimsyn_embed == 0 : どのスクリプトの埋め込みも対応しない
3143
+ g:vimsyn_embed =~ 'l' : 埋め込み lua をサポート
3108
3144
g:vimsyn_embed =~ 'm' : 埋め込み mzscheme をサポート
3109
3145
g:vimsyn_embed =~ 'p' : 埋め込み perl をサポート
3110
3146
g:vimsyn_embed =~ 'P' : 埋め込み python をサポート
@@ -3121,6 +3157,7 @@ syntax/vim.vim によって折り畳みが可能である: >
3121
3157
g:vimsyn_folding == 0 または変数が存在しない: 構文ベースの折り畳みはしない
3122
3158
g:vimsyn_folding =~ 'a' : augroups
3123
3159
g:vimsyn_folding =~ 'f' : 関数を折り畳む
3160
+ g:vimsyn_folding =~ 'l' : lua スクリプトを折り畳む
3124
3161
g:vimsyn_folding =~ 'm' : mzscheme スクリプトを折り畳む
3125
3162
g:vimsyn_folding =~ 'p' : perl スクリプトを折り畳む
3126
3163
g:vimsyn_folding =~ 'P' : python スクリプトを折り畳む
@@ -3196,6 +3233,31 @@ xpm.vimは編集中のXPMファイルの内容から、動的に構文要素を
3196
3233
:set guifont=-*-clean-medium-r-*-*-8-*-*-*-*-80-*
3197
3234
3198
3235
3236
+ YAML *yaml.vim* *ft-yaml-syntax*
3237
+
3238
+ *g:yaml_schema* *b:yaml_schema*
3239
+ A YAML schema is a combination of a set of tags and a mechanism for resolving
3240
+ non-specific tags. For user this means that YAML parser may, depending on
3241
+ plain scalar contents, treat plain scalar (which can actually be only string
3242
+ and nothing else) as a value of the other type: null, boolean, floating-point,
3243
+ integer. `g: yaml_schema ` option determines according to which schema values
3244
+ will be highlighted specially. Supported schemas are
3245
+
3246
+ Schema Description ~
3247
+ failsafe No additional highlighting.
3248
+ json Supports JSON-style numbers, booleans and null.
3249
+ core Supports more number, boolean and null styles.
3250
+ pyyaml In addition to core schema supports highlighting timestamps,
3251
+ but there are some differences in what is recognized as
3252
+ numbers and many additional boolean values not present in core
3253
+ schema.
3254
+
3255
+ Default schema is `core` .
3256
+
3257
+ Note that schemas are not actually limited to plain scalars, but this is the
3258
+ only difference between schemas defined in YAML specification and the only
3259
+ difference defined in the syntax file.
3260
+
3199
3261
==============================================================================
3200
3262
5. 構文を定義する *:syn-define* *E410*
3201
3263
@@ -3271,6 +3333,32 @@ xpm.vimは編集中のXPMファイルの内容から、動的に構文要素を
3271
3333
スペルチェックを有効化するにはオプション 'spell' をオンにしなければな
3272
3334
らない。
3273
3335
3336
+ SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
3337
+
3338
+ :sy[ntax] iskeyword [clear | {option} ]
3339
+ This defines the keyword characters. It's like the 'iskeyword' option
3340
+ for but only applies to syntax highlighting.
3341
+
3342
+ clear: Syntax specific iskeyword setting is disabled and the
3343
+ buffer-local 'iskeyword' setting is used.
3344
+ {option} Set the syntax 'iskeyword' option to a new value.
3345
+
3346
+ Example: >
3347
+ :syntax iskeyword @,48-57,192-255,$,_
3348
+ <
3349
+ This would set the syntax specific iskeyword option to include all
3350
+ alphabetic characters, plus the numeric characters, all accented
3351
+ characters and also includes the "_" and the "$".
3352
+
3353
+ If no argument is given, the current value will be output.
3354
+
3355
+ Setting this option influences what | /\k | matches in syntax patterns
3356
+ and also determines where | :syn-keyword | will be checked for a new
3357
+ match.
3358
+
3359
+ It is recommended when writing syntax files, to use this command
3360
+ to the correct value for the specific syntax language and not change
3361
+ the 'iskeyword' option.
3274
3362
3275
3363
キーワードの定義 *:syn-keyword*
3276
3364
@@ -3302,6 +3390,7 @@ xpm.vimは編集中のXPMファイルの内容から、動的に構文要素を
3302
3390
ワードは認識されない。
3303
3391
マルチバイト文字を使うこともできる。マルチバイト文字は 'iskeyword' に
3304
3392
含まれている必要はない。
3393
+ See | :syn-iskeyword | for defining syntax specific iskeyword settings.
3305
3394
3306
3395
キーワードは常にマッチやリージョンより優先される。キーワードは一要素以
3307
3396
上マッチしたとき使われる。キーワードは入れ子にならなく、それ以外のもの
@@ -3537,6 +3626,7 @@ conceal *conceal* *:syn-conceal*
3537
3626
際に Conceal 表示されるかどうかは 'conceallevel' オプションの設定に依存する。
3538
3627
現在行のアイテムを Conceal 表示するかどうかは 'concealcursor' オプションで制御
3539
3628
できる (行の編集を妨げないようにするため)。
3629
+ Another way to conceal text with with | matchadd() | .
3540
3630
3541
3631
concealends *:syn-concealends*
3542
3632
@@ -3956,7 +4046,7 @@ skipパターンも "\n" を含んでよい。ただし次の行の最初の文
3956
4046
:syn region hereDoc start="<<\z(\I\i*\)" end="^\z1$"
3957
4047
3958
4048
このように、\zは2つの役割を果たす。startパターンにおいては正規表現の一部
3959
- "\(\I\i*\)" をexternalとしてマークする。endパターンでは\1によってstartパターン
4049
+ "\(\I\i*\)" をexternalとしてマークする。endパターンでは\z1によってstartパターン
3960
4050
中の最初のマークされた部分への外部参照とする。外部参照はskipパターン中でも使え
3961
4051
る: >
3962
4052
:syn region foo start="start \(\I\i*\)" skip="not end \z1" end="end \z1"
@@ -4443,21 +4533,23 @@ ctermbg={color-nr} *highlight-ctermbg*
4443
4533
14 3* Yellow, LightYellow
4444
4534
15 7* White
4445
4535
4446
- "NR-16" の下の番号は16色ターミナル('t_Co' が16以上のもの)用である。
4447
- "NR-8" の下の番号は8色ターミナル('t_Co' が16未満のもの)用である。
4448
- '*' はctermfgにbold属性がセットされることを意味している。"linux"
4449
- など多くの8色ターミナルでは明るい色になる。ただし背景色には適用さ
4450
- れない。'*' がないものはbold属性なしになる。他の方法でbold属性をつ
4451
- けたいなら引数 "cterm=" を "ctermfg=" や "ctermbg=" の後に書くこ
4452
- と。または色名の代わりに番号を使うこと。
4536
+ "NR-16" の下の番号は16色ターミナル('t_Co' が16以上のもの)用である。
4537
+ "NR-8" の下の番号は8色ターミナル('t_Co' が16未満のもの)用である。
4538
+ '*' はctermfgにbold属性がセットされることを意味している。"linux"
4539
+ など多くの8色ターミナルでは明るい色になる。ただし背景色には適用さ
4540
+ れない。'*' がないものはbold属性なしになる。他の方法でbold属性をつ
4541
+ けたいなら引数 "cterm=" を "ctermfg=" や "ctermbg=" の後に書くこ
4542
+ と。または色名の代わりに番号を使うこと。
4543
+
4544
+ 色名の大文字・小文字は無視される。
4545
+ 16色ansiスタイルターミナル(xtermを含む)ではNR-8の列の番号が使われ
4546
+ ることに注意。ここで '*' は 'add 8' という意味になる。つまりBlueが
4547
+ 12に、DarkGrayが8になる。
4453
4548
4454
- 色名の大文字・小文字は無視される。
4455
- 16色ansiスタイルターミナル(xtermを含む)ではNR-8の列の番号が使われ
4456
- ることに注意。ここで '*' は 'add 8' という意味になる。つまりBlueが
4457
- 12に、DarkGrayが8になる。
4549
+ カラーターミナルによっては、色名を使うと間違った色で表示される場合
4550
+ もあることに注意。
4458
4551
4459
- カラーターミナルによっては、色名を使うと間違った色で表示される場合
4460
- もあることに注意。
4552
+ You can also use "NONE" to remove the color.
4461
4553
4462
4554
*:hi-normal-cterm*
4463
4555
Normalグループに対して "ctermfg" や "ctermbg" を設定すると、これらはハ
@@ -4866,6 +4958,7 @@ types.vim: *.[ch]
4866
4958
更されない。"b:current_syntax" は構文ファイルによって変更されるが、
4867
4959
"b:current_syntax" を一時的に保存・復元することで値が変わらないようになってい
4868
4960
る。構文ファイルによって設定された値が "w:current_syntax" に代入される。
4961
+ Note: This resets the 'spell' , 'spellcapcheck' and 'spellfile' options.
4869
4962
4870
4963
ウィンドウの独自構文が定義されると、同じバッファの他のウィンドウで実行された構
4871
4964
文コマンド (:syntax clear を含む) が影響しなくなる。逆に、そのウィンドウで実行
0 commit comments