diff --git a/doc/syntax.jax b/doc/syntax.jax index 4c69ac42c..273be7d52 100644 --- a/doc/syntax.jax +++ b/doc/syntax.jax @@ -1,4 +1,4 @@ -*syntax.txt* For Vim バージョン 9.0. Last change: 2022 Jun 10 +*syntax.txt* For Vim バージョン 9.0. Last change: 2022 Dec 26 VIMリファレンスマニュアル by Bram Moolenaar @@ -671,6 +671,22 @@ Vim 内での表示と同じように表示され、タブ文字もそのまま > :let g:html_no_pre = 1 < + *g:html_no_doc* +初期設定: 0 +1 の場合、DOCTYPE, , などを含む完全な HTML ドキュメントは生成され +ない。|g:html_use_css| が有効になっている場合 (デフォルト)、CSS を手動で定義す +る必要がある。|g:html_dynamic_folds| および |g:html_line_ids| 設定 (デフォルト +ではオフ) も、いくつかの JavaScript を挿入する。 + + + *g:html_no_links* +初期設定: 0 +URL のようなテキストには タグを生成しない。 + + *g:html_no_modeline* +初期設定: 0 +折り畳みを無効化するモードラインを生成しない。 + *g:html_expand_tabs* 初期設定: 'tabstop' が 8 で 'expandtab' が 0 で 'vartabstop' が使われていない、 かつ、foldcolumn と行番号がない場合は 0。 @@ -1810,6 +1826,16 @@ htmlプロセッサー言語は複数ある。html.vimはインクルードし そしてプリプロセッサー言語を含むすべての領域をクラスタhtmlPreprocに加えればよ い。 + *html-folding* +HTML 構文ファイルは、開始タグと終了タグ間の構文折り畳み |folding| (|:syn-fold| +を参照) を提供する。これは次の方法でオンにできる > + + :let g:html_syntax_folding = 1 + :set foldmethod=syntax + +Note: 構文による折り畳みは、構文ハイライトを著しく遅くする可能性がある。特に巨 +大なファイルではそうである。 + HTML/OS (by Aestiva) *htmlos.vim* *ft-htmlos-syntax* @@ -2924,6 +2950,15 @@ Append/Change/Insertコマンドに含まれるテキストいずれかの中の る)。このオプションを有効化するなら、タブ幅を1文字にするとよい。そうすると文字 列中のタブの数を数えやすくなる。 +GNU sed では、同じ行のテキストの後ろにコメントを書くことができる。BSD sed では +"#" が行頭である場合にしかコメントとみなされない。BSD 形式のコメントを強制す +る、すなわち行末コメントをエラーとして表示するには: > + + :let g:sed_dialect = "bsd" +< +Note GNU sed と BSD sed の間には、この設定によって (まだ) 影響を受けていない他 +の違いがある。 + バグ: 変換コマンド(y)は置換コマンドとまったく同様に扱われる。つまり、この構文ファ @@ -3306,16 +3341,20 @@ LOCALMATHをあなたが決めた新しいmathグループに書き換える必 *tex-style* *b:tex_stylish* Tex: 新しいスタイルを始めるには ~ -*.texファイルで "\makeatletter" を使う人がいるかもしれないので、コマンド中で -"@" が使えるようになっている。しかし*.texファイルは次の拡張子: sty cls clo dtx -ltx を持たないので @ をエラーと判断してハイライトする。これを解決するにはこう -する: > +"\makeatletter" を用いれば、*.tex ファイルのなかで "@" という文字を含むコマンド +を利用できる。しかしながら、拡張子が sty cls clo dtx ltx のどれでもない場合、@ +を含むコマンドはエラーとして表示される。これを解決するには: > :let b:tex_stylish = 1 :set ft=tex "let g:tex_stylish=1" を<.vimrc>に書くとは常にこのような @ の 使用法を受け入れるようになる。 +{訳注: この挙動は、おもに LaTeX において、「@ を含むコマンドは開発用途として +使う」という取り決めがあることに由来する(と思われる)。ちょうど、一般のプログ +ラミング言語における隠蔽変数のようなものである。「普通の」TeX ファイルを編集 +するさいには、そのようなコマンドを扱うことはないから、@ を含んだコマンドが +「エラー」になるのはある意味で正しい挙動と言える。} *tex-cchar* *tex-cole* *tex-conceal* Tex: Conceal モードを活用する ~ @@ -5170,14 +5209,18 @@ CursorLineFold FoldColumn と同じだが 'cursorline' が設定されたとき *hl-MatchParen* MatchParen カーソル下の文字、または直後の文字が括弧であるとき、その文字と 対応する括弧に使われる。|pi_paren.txt| + *hl-MessageWindow* +MessageWindow `:echowindow` で表示されるポップアップウィンドウにおけるメッ + セージ。定義されていないときは |hl-WarningMsg| が用いられる。 *hl-ModeMsg* ModeMsg 'showmode' のメッセージ(例、"-- INSERT --")。 *hl-MoreMsg* MoreMsg |more-prompt| *hl-NonText* -NonText ウィンドウの端の '@' と 'showbreak' で設定された文字など、実際 - のテキストには存在しない文字(例. 全角文字が行末に収まらないと - き ">" が表示される)。 +NonText ウィンドウの端の '@' や、'smoothscroll' を設定しているときの + 行頭に表示される "<<<"、'showbreak' で設定された文字など、 + 実際のテキストには存在しない文字(例. 全角文字が行末に収まらな + いとき ">" が表示される)。 *hl-Normal* Normal 通常のテキスト。 *hl-Pmenu* @@ -5188,6 +5231,10 @@ PmenuSel ポップアップメニュー: 選択されている項目。 PmenuSbar ポップアップメニュー: スクロールバー。 *hl-PmenuThumb* PmenuThumb ポップアップメニュー: スクロールバーのつまみ部分。 + *hl-PopupNotification* +PopupNotification + |popup_notification()| で生成されたポップアップウィンドウ。 + 定義されていないときは |hl-WarningMsg| が用いられる。 *hl-Question* Question ヒットエンタープロンプト|hit-enter|とyes/noクエスチョン。 *hl-QuickFixLine* @@ -5461,7 +5508,8 @@ types.vim: *.[ch] 更されない。"b:current_syntax" は構文ファイルによって変更されるが、 "b:current_syntax" を一時的に保存・復元することで値が変わらないようになってい る。構文ファイルによって設定された値が "w:current_syntax" に代入される。 -Note: This resets the 'spell', 'spellcapcheck' and 'spellfile' options. +Note: この設定によって 'spell', 'spellcapcheck', 'spellfile' オプションは初期 +設定に戻る。 ウィンドウの独自構文が定義されると、同じバッファの他のウィンドウで実行された構 文コマンド (:syntax clear を含む) が影響しなくなる。逆に、そのウィンドウで実行 diff --git a/en/syntax.txt b/en/syntax.txt index 86e7edd02..27c65dacc 100644 --- a/en/syntax.txt +++ b/en/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 9.0. Last change: 2022 Jun 10 +*syntax.txt* For Vim version 9.0. Last change: 2022 Dec 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -500,7 +500,7 @@ Force to omit the line numbers: > Go back to the default to use 'number' by deleting the variable: > :unlet g:html_number_lines < - *g:html_line_ids* + *g:html_line_ids* Default: 1 if |g:html_number_lines| is set, 0 otherwise. When 1, adds an HTML id attribute to each line number, or to an empty inserted for that purpose if no line numbers are shown. This ID attribute @@ -692,6 +692,22 @@ the rendered page generated by 2html.vim. > :let g:html_no_pre = 1 < + *g:html_no_doc* +Default: 0. +When 1 it doesn't generate a full HTML document with a DOCTYPE, , +, etc. If |g:html_use_css| is enabled (the default) you'll have to +define the CSS manually. The |g:html_dynamic_folds| and |g:html_line_ids| +settings (off by default) also insert some JavaScript. + + + *g:html_no_links* +Default: 0. +Don't generate tags for text that looks like an URL. + + *g:html_no_modeline* +Default: 0. +Don't generate a modeline disabling folding. + *g:html_expand_tabs* Default: 0 if 'tabstop' is 8, 'expandtab' is 0, 'vartabstop' is not in use, and no fold column or line numbers occur in the generated HTML; @@ -1872,6 +1888,16 @@ following two lines to the syntax coloring file for that language Now you just need to make sure that you add all regions that contain the preprocessor language to the cluster htmlPreproc. + *html-folding* +The HTML syntax file provides syntax |folding| (see |:syn-fold|) between start +and end tags. This can be turned on by > + + :let g:html_syntax_folding = 1 + :set foldmethod=syntax + +Note: Syntax folding might slow down syntax highlighting significantly, +especially for large files. + HTML/OS (by Aestiva) *htmlos.vim* *ft-htmlos-syntax* @@ -2400,7 +2426,7 @@ you set the variable: > :let papp_include_html=1 -in your startup file it will try to syntax-hilight html code inside phtml +in your startup file it will try to syntax-highlight html code inside phtml sections, but this is relatively slow and much too colourful to be able to edit sensibly. ;) @@ -2932,7 +2958,7 @@ Default folding is rather detailed, i.e., small syntax units like "if", "do", You can set "ruby_foldable_groups" to restrict which groups are foldable: > - :let ruby_foldable_groups = 'if case %' + :let ruby_foldable_groups = 'if case %' < The value is a space-separated list of keywords: @@ -2940,22 +2966,22 @@ The value is a space-separated list of keywords: -------- ------------------------------------- ~ ALL Most block syntax (default) NONE Nothing - if "if" or "unless" block + if "if" or "unless" block def "def" block class "class" block module "module" block - do "do" block + do "do" block begin "begin" block case "case" block for "for", "while", "until" loops - { Curly bracket block or hash literal - [ Array literal - % Literal with "%" notation, e.g.: %w(STRING), %!STRING! - / Regexp + { Curly bracket block or hash literal + [ Array literal + % Literal with "%" notation, e.g.: %w(STRING), %!STRING! + / Regexp string String and shell command output (surrounded by ', ", `) - : Symbol - # Multiline comment - << Here documents + : Symbol + # Multiline comment + << Here documents __END__ Source code after "__END__" directive *ruby_no_expensive* @@ -3021,16 +3047,25 @@ satisfied with it for my own projects. SED *sed.vim* *ft-sed-syntax* To make tabs stand out from regular blanks (accomplished by using Todo -highlighting on the tabs), define "highlight_sedtabs" by putting > - - :let highlight_sedtabs = 1 +highlighting on the tabs), define "g:sed_highlight_tabs" by putting > + :let g:sed_highlight_tabs = 1 +< in the vimrc file. (This special highlighting only applies for tabs inside search patterns, replacement texts, addresses or text included by an Append/Change/Insert command.) If you enable this option, it is also a good idea to set the tab width to one character; by doing that, you can easily count the number of tabs in a string. +GNU sed allows comments after text on the same line. BSD sed only allows +comments where "#" is the first character of the line. To enforce BSD-style +comments, i.e. mark end-of-line comments as errors, use: > + + :let g:sed_dialect = "bsd" +< +Note that there are other differences between GNU sed and BSD sed which are +not (yet) affected by this setting. + Bugs: The transform command (y) is treated exactly like the substitute @@ -3153,7 +3188,7 @@ The default is to use the twice sh_minlines. Set it to a smaller number to speed up displaying. The disadvantage is that highlight errors may appear. syntax/sh.vim tries to flag certain problems as errors; usually things like -extra ']'s, 'done's, 'fi's, etc. If you find the error handling problematic +unmatched "]", "done", "fi", etc. If you find the error handling problematic for your purposes, you may suppress such error highlighting by putting the following line in your .vimrc: > @@ -3586,6 +3621,14 @@ highlighting is to put the following line in your |vimrc|: > < +WDL *wdl.vim* *wdl-syntax* + +The Workflow Description Language is a way to specify data processing workflows +with a human-readable and writeable syntax. This is used a lot in +bioinformatics. More info on the spec can be found here: +https://github.com/openwdl/wdl + + XF86CONFIG *xf86conf.vim* *ft-xf86conf-syntax* The syntax of XF86Config file differs in XFree86 v3.x and v4.x. Both @@ -3793,7 +3836,7 @@ SYNTAX ISKEYWORD SETTING *:syn-iskeyword* clear: Syntax specific iskeyword setting is disabled and the buffer-local 'iskeyword' setting is used. - {option} Set the syntax 'iskeyword' option to a new value. + {option} Set the syntax 'iskeyword' option to a new value. Example: > :syntax iskeyword @,48-57,192-255,$,_ @@ -4866,7 +4909,7 @@ is mostly used, because it looks better. In the next section you can find information about indivisual highlight groups and how to specify colors for them. Most likely you want to just select a set of colors by using the `:colorscheme` command, for example: > - + colorscheme pablo < *:colo* *:colorscheme* *E185* @@ -4905,6 +4948,7 @@ Before the color scheme will be loaded all default color list scripts autocommand event is triggered. After the color scheme has been loaded the |ColorScheme| autocommand event is triggered. + *colorscheme-override* If a color scheme is almost right, you can add modifications on top of it by using the |ColorScheme| autocommand. For example, to remove the background color (can make it transparent in some terminals): > @@ -4917,7 +4961,7 @@ Change a couple more colors: > augroup my_colorschemes au! au Colorscheme pablo hi Normal ctermbg=NONE - \ | higlight Special ctermfg=63 + \ | highlight Special ctermfg=63 \ | highlight Identifier ctermfg=44 augroup END @@ -4959,7 +5003,7 @@ in their own color. *highlight-clear* *:hi-clear* :hi[ghlight] clear Reset all highlighting to the defaults. Removes all - highlighting for groups added by the user! + highlighting for groups added by the user. Uses the current value of 'background' to decide which default colors to use. If there was a default link, restore it. |:hi-link| @@ -5270,7 +5314,7 @@ guisp={color-name} *highlight-guisp* "gg" is the Green value "bb" is the Blue value All values are hexadecimal, range from "00" to "ff". Examples: > - :highlight Comment guifg=#11f0c3 guibg=#ff00ff + :highlight Comment guifg=#11f0c3 guibg=#ff00ff < If you are authoring a color scheme and use the same hexadecimal value repeatedly, you can define a name for it in |v:colornames|. For @@ -5360,23 +5404,26 @@ LineNrBelow Line number for when the 'relativenumber' *hl-CursorLineNr* CursorLineNr Like LineNr when 'cursorline' is set and 'cursorlineopt' contains "number" or is "both", for the cursor line. - *hl-CursorLineSign* -CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line. *hl-CursorLineFold* CursorLineFold Like FoldColumn when 'cursorline' is set for the cursor line. + *hl-CursorLineSign* +CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line. *hl-MatchParen* MatchParen Character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| - + *hl-MessageWindow* +MessageWindow Messages popup window used by `:echowindow`. If not defined + |hl-WarningMsg| is used. *hl-ModeMsg* ModeMsg 'showmode' message (e.g., "-- INSERT --"). *hl-MoreMsg* MoreMsg |more-prompt| *hl-NonText* -NonText '@' at the end of the window, characters from 'showbreak' - and other characters that do not really exist in the text - (e.g., ">" displayed when a double-wide character doesn't - fit at the end of the line). +NonText '@' at the end of the window, "<<<" at the start of the window + for 'smoothscroll', characters from 'showbreak' and other + characters that do not really exist in the text, such as the + ">" displayed when a double-wide character doesn't fit at the + end of the line. *hl-Normal* Normal Normal text. *hl-Pmenu* @@ -5387,6 +5434,10 @@ PmenuSel Popup menu: Selected item. PmenuSbar Popup menu: Scrollbar. *hl-PmenuThumb* PmenuThumb Popup menu: Thumb of the scrollbar. + *hl-PopupNotification* +PopupNotification + Popup window created with |popup_notification()|. If not + defined |hl-WarningMsg| is used. *hl-Question* Question |hit-enter| prompt and yes/no questions. *hl-QuickFixLine*