Skip to content

Commit 1e8840a

Browse files
authored
Merge pull request #1784 from h-east/update-helphelp
Update helphelp.{txt,jax}
2 parents 2349d0c + b42b7fa commit 1e8840a

File tree

2 files changed

+113
-3
lines changed

2 files changed

+113
-3
lines changed

doc/helphelp.jax

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*helphelp.txt* For Vim バージョン 9.1. Last change: 2024 Apr 10
1+
*helphelp.txt* For Vim バージョン 9.1. Last change: 2024 Nov 03
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -242,7 +242,61 @@ $VIMRUNTIME/docにあるファイルは対象外です。
242242
ランタイムディレクトリのヘルプタグファイルを作成し直す
243243
には次のようにします (ファイルの書き込み権限が必要): >
244244
:helptags $VIMRUNTIME/doc
245-
245+
<
246+
*help-TOC* *help-toc-install*
247+
248+
ファイル内の任意の位置から対話的な目次にアクセスしたい場合は、helptoc プラグイ
249+
ンを使用できます。以下のようにプラグインを読込みます: >
250+
251+
packadd helptoc
252+
253+
次に、`:HelpToc` コマンドを使用してポップアップメニューを開くことができます。
254+
後者は、以下のノーマルコマンドをサポートしています: >
255+
256+
キー| 作用
257+
----+---------------------------------------------------------
258+
j | 次のエントリを選択する
259+
k | 前のエントリを選択する
260+
J | j と同じかつ、メインバッファの対応する行にジャンプする
261+
K | k と同じかつ、メインバッファの対応する行にジャンプする
262+
c | メインバッファのカーソル位置から最も近いエントリを選択する
263+
g | 最初のエントリを選択する
264+
G | 最後のエントリを選択する
265+
H | 1 レベル折り畳む
266+
L | 1 レベル展開する
267+
p | コマンドラインに現在のエントリを表示する
268+
269+
P | p と同じだが、選択が変更されるたびに自動的に実行される
270+
| 複数回押すと、機能のオン/オフが切り替わる
271+
272+
q | メニューを終了する
273+
z | 現在のエントリを中央にしてメニューを再描画する
274+
+ | ポップアップメニューの幅を広げる
275+
- | ポップアップメニューの幅を狭める
276+
? | ヘルプウィンドウを表示/非表示にする
277+
/ | パターンを検索する
278+
279+
<C-D> | 半ページ下にスクロールする
280+
<C-U> | 半ページ上にスクロールする
281+
<PageUp> | ページ全体を下にスクロールする
282+
<PageDown> | ページ全体を上にスクロールする
283+
<Home> | 最初のエントリを選択する
284+
<End> | 最後のエントリを選択する
285+
286+
このプラグインは、man ページ、markdown ファイル、および端末バッファに目次を提
287+
供することもできます。端末バッファの場合、エントリは過去に実行されたシェルコマ
288+
ンドになります。それらを検索するために、以下のパターンが使用されます: >
289+
290+
^\w\+@\w\+:\f\+\$\s
291+
292+
これは、デフォルトの bash プロンプトにマッチするように意図されています。プロン
293+
プトとマッチしない場合は、`g:helptoc` 辞書変数の `shell_prompt` キーを使用して
294+
正規表現を変更できます: >
295+
296+
let g:helptoc = {'shell_prompt': 'regex matching your shell prompt'}
297+
298+
Tip: `/` コマンドで検索するパターンを挿入した後、<CR> ではなく <Esc> を押すと、
299+
`J` または `K` を押すことで残りの各エントリの詳細なコンテキストを取得できます。
246300

247301
==============================================================================
248302
2. 翻訳ヘルプ *help-translated*

en/helphelp.txt

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*helphelp.txt* For Vim version 9.1. Last change: 2024 Apr 10
1+
*helphelp.txt* For Vim version 9.1. Last change: 2024 Nov 03
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -246,6 +246,62 @@ command: >
246246
To rebuild the help tags in the runtime directory
247247
(requires write permission there): >
248248
:helptags $VIMRUNTIME/doc
249+
<
250+
*help-TOC* *help-toc-install*
251+
252+
If you want to access an interactive table of contents, from any position in
253+
the file, you can use the helptoc plugin. Load the plugin with: >
254+
255+
packadd helptoc
256+
257+
Then you can use the `:HelpToc` command to open a popup menu.
258+
The latter supports the following normal commands: >
259+
260+
key | effect
261+
----+---------------------------------------------------------
262+
j | select next entry
263+
k | select previous entry
264+
J | same as j, and jump to corresponding line in main buffer
265+
K | same as k, and jump to corresponding line in main buffer
266+
c | select nearest entry from cursor position in main buffer
267+
g | select first entry
268+
G | select last entry
269+
H | collapse one level
270+
L | expand one level
271+
p | print current entry on command-line
272+
273+
P | same as p but automatically, whenever selection changes
274+
| press multiple times to toggle feature on/off
275+
276+
q | quit menu
277+
z | redraw menu with current entry at center
278+
+ | increase width of popup menu
279+
- | decrease width of popup menu
280+
? | show/hide a help window
281+
/ | search for pattern
282+
283+
<C-D> | scroll down half a page
284+
<C-U> | scroll up half a page
285+
<PageUp> | scroll down a whole page
286+
<PageDown> | scroll up a whole page
287+
<Home> | select first entry
288+
<End> | select last entry
289+
290+
The plugin can also provide a table of contents in man pages, markdown files,
291+
and terminal buffers. In the latter, the entries will be the past executed
292+
shell commands. To find those, the following pattern is used: >
293+
294+
^\w\+@\w\+:\f\+\$\s
295+
296+
This is meant to match a default bash prompt. If it doesn't match your prompt,
297+
you can change the regex with the `shell_prompt` key from the `g:helptoc`
298+
dictionary variable: >
299+
300+
let g:helptoc = {'shell_prompt': 'regex matching your shell prompt'}
301+
302+
Tip: After inserting a pattern to look for with the `/` command, if you press
303+
<Esc> instead of <CR>, you can then get more context for each remaining entry
304+
by pressing `J` or `K`.
249305

250306
==============================================================================
251307
2. Translated help files *help-translated*

0 commit comments

Comments
 (0)