Skip to content

Update pi_paren.{txt,jax} #1783

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
Nov 7, 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
18 changes: 14 additions & 4 deletions doc/pi_paren.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*pi_paren.txt* For Vim バージョン 9.1. Last change: 2013 May 08
*pi_paren.txt* For Vim バージョン 9.1. Last change: 2024 Nov 04


VIMリファレンスマニュアル by Bram Moolenaar
Expand All @@ -11,6 +11,7 @@

このプラグインが読み込まれないようにするには変数 "loaded_matchparen" を設定し
てください: >

:let loaded_matchparen = 1

このプラグインは自動コマンドイベントの CursorMoved、CursorMovedI、WinEnter を
Expand All @@ -30,6 +31,15 @@

:hi MatchParen ctermbg=blue guibg=lightblue

デフォルトでは、プラグインはカーソルの下の括弧とマッチする括弧の両方を、
|hl-MatchParen| ハイライトグループを使用してハイライトします。これにより、カー
ソルのハイライトが MatchParen の色に置き換えられるため、カーソルが一時的に画面
から消える場合があります。これを防ぎ、プラグインがマッチする括弧のみをハイライ
トし、(実質的にカーソルのスタイルを変更せずに) カーソルの下の括弧をハイライト
しないようにするには、"matchparen_disable_cursor_hl" 変数を設定します: >

:let matchparen_disable_cursor_hl = 1

オプション 'matchpairs' に設定されている文字が強調表示されます。このオプション
を設定することで好きな文字を強調表示できます。Note: 設定しても機能しない文字も
あります。例えば、シングルクォートやダブルクォートのペアなどは、始点と終点が同
Expand All @@ -48,9 +58,9 @@
- 長い行が構文強調表示されていると処理に時間がかかるので、カーソル位置から
'synmaxcol' の二倍の範囲の文字だけ検索する。
- 300 ミリ秒でタイムアウト (挿入モードでは 60 ミリ秒)。これは変数の
g:matchparen_timeout と g:matchparen_insert_timeout を設定することで変更でき
。バッファ毎に設定する場合は b:matchparen_timeout と
b:matchparen_insert_timeout を設定する。
"g:matchparen_timeout""g:matchparen_insert_timeout" を設定することで変更
できる。バッファ毎に設定する場合は "b:matchparen_timeout"
"b:matchparen_insert_timeout" を設定する。

|%| コマンドの動作を改善したい場合は matchit プラグインを使ってください。
|matchit-install| 参照。このプラグインを使うとコメント内のカッコをスキップする
Expand Down
21 changes: 16 additions & 5 deletions en/pi_paren.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*pi_paren.txt* For Vim version 9.1. Last change: 2013 May 08
*pi_paren.txt* For Vim version 9.1. Last change: 2024 Nov 04


VIM REFERENCE MANUAL by Bram Moolenaar
Expand All @@ -10,6 +10,7 @@ The functionality mentioned here is a |standard-plugin|.
This plugin is only available if 'compatible' is not set.

You can avoid loading this plugin by setting the "loaded_matchparen" variable: >

:let loaded_matchparen = 1

The plugin installs CursorMoved, CursorMovedI and WinEnter autocommands to
Expand All @@ -29,6 +30,16 @@ the ":highlight" command. Example: >

:hi MatchParen ctermbg=blue guibg=lightblue

By default the plugin will highlight both the paren under the cursor and the
matching one using the |hl-MatchParen| highlighting group. This may result in
the cursor briefly disappearing from the screen as the MatchParen colors take
over the cursor highlight. To prevent this from happening and have the plugin
only highlight the matching paren and not the one under the cursor
(effectively leaving the cursor style unchanged), you can set the
"matchparen_disable_cursor_hl" variable: >

:let matchparen_disable_cursor_hl = 1

The characters to be matched come from the 'matchpairs' option. You can
change the value to highlight different matches. Note that not everything is
possible. For example, you can't highlight single or double quotes, because
Expand All @@ -46,10 +57,10 @@ are:
closed folds.
- 'synmaxcol' times 2 bytes before or after the cursor to avoid a delay
in a long line with syntax highlighting.
- A timeout of 300 msec (60 msec in Insert mode). This can be changed with the
g:matchparen_timeout and g:matchparen_insert_timeout variables and their
buffer-local equivalents b:matchparen_timeout and
b:matchparen_insert_timeout.
- A timeout of 300 msec (60 msec in Insert mode). This can be changed with
the "g:matchparen_timeout" and "g:matchparen_insert_timeout" variables and
their buffer-local equivalents "b:matchparen_timeout" and
"b:matchparen_insert_timeout".

If you would like the |%| command to work better, the matchit plugin can be
used, see |matchit-install|. This plugin also helps to skip matches in
Expand Down