Skip to content

Update pattern.{txt,jax} #1513

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 1 commit into from
May 9, 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
15 changes: 14 additions & 1 deletion doc/pattern.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*pattern.txt* For Vim バージョン 9.1. Last change: 2023 Oct 23
*pattern.txt* For Vim バージョン 9.1. Last change: 2024 Apr 26


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -1371,6 +1371,19 @@ Vim では、'^' と '$' は常に中間の改行にもマッチします。最
==============================================================================
10. マッチしたテキストを強調する *match-highlight*

*syntax-vs-match*
Note マッチハイライトのメカニズムは |syntax-highlighting| とは
独立していることに注意してください。これは (通常は) バッファ
ローカルのハイライトですが、マッチングはウィンドウローカルであ
り、両方の方法を自由に混合できます。マッチハイライト関数を使用
すると、いつ、どのように適用するかについてもう少し柔軟性が得ら
れますが、通常は厳密なルールがなく、一時的なハイライトにのみ使
用されます。どちらの方法もテキストを隠すために使用できます。

したがって、|matchadd()| のようなマッチング関数は、構文ルール
や |syncconcealed()| のような関数を考慮しません。また、その逆
も考慮されません。

*:mat* *:match*
:mat[ch] {group} /{pattern}/
カレントウィンドウ内で強調表示するパターンを定義します。強調に
Expand Down
15 changes: 14 additions & 1 deletion en/pattern.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 9.1. Last change: 2023 Oct 23
*pattern.txt* For Vim version 9.1. Last change: 2024 Apr 26


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -1394,6 +1394,19 @@ Finally, these constructs are unique to Perl:
==============================================================================
10. Highlighting matches *match-highlight*

*syntax-vs-match*
Note that the match highlight mechanism is independent
of |syntax-highlighting|, which is (usually) a buffer-local
highlighting, while matching is window-local, both methods
can be freely mixed. Match highlighting functions give you
a bit more flexibility in when and how to apply, but are
typically only used for temporary highlighting, without strict
rules. Both methods can be used to conceal text.

Thus the matching functions like |matchadd()| won't consider
syntax rules and functions like |synconcealed()| and the
other way around.

*:mat* *:match*
:mat[ch] {group} /{pattern}/
Define a pattern to highlight in the current window. It will
Expand Down