Skip to content

Update helphelp.{txt,jax} #1784

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 3 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
58 changes: 56 additions & 2 deletions doc/helphelp.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*helphelp.txt* For Vim バージョン 9.1. Last change: 2024 Apr 10
*helphelp.txt* For Vim バージョン 9.1. Last change: 2024 Nov 03


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -242,7 +242,61 @@ $VIMRUNTIME/docにあるファイルは対象外です。
ランタイムディレクトリのヘルプタグファイルを作成し直す
には次のようにします (ファイルの書き込み権限が必要): >
:helptags $VIMRUNTIME/doc

<
*help-TOC* *help-toc-install*

ファイル内の任意の位置から対話的な目次にアクセスしたい場合は、helptoc プラグイ
ンを使用できます。以下のようにプラグインを読込みます: >

packadd helptoc

次に、`:HelpToc` コマンドを使用してポップアップメニューを開くことができます。
後者は、以下のノーマルコマンドをサポートしています: >

キー| 作用
----+---------------------------------------------------------
j | 次のエントリを選択する
k | 前のエントリを選択する
J | j と同じかつ、メインバッファの対応する行にジャンプする
K | k と同じかつ、メインバッファの対応する行にジャンプする
c | メインバッファのカーソル位置から最も近いエントリを選択する
g | 最初のエントリを選択する
G | 最後のエントリを選択する
H | 1 レベル折り畳む
L | 1 レベル展開する
p | コマンドラインに現在のエントリを表示する

P | p と同じだが、選択が変更されるたびに自動的に実行される
| 複数回押すと、機能のオン/オフが切り替わる

q | メニューを終了する
z | 現在のエントリを中央にしてメニューを再描画する
+ | ポップアップメニューの幅を広げる
- | ポップアップメニューの幅を狭める
? | ヘルプウィンドウを表示/非表示にする
/ | パターンを検索する

<C-D> | 半ページ下にスクロールする
<C-U> | 半ページ上にスクロールする
<PageUp> | ページ全体を下にスクロールする
<PageDown> | ページ全体を上にスクロールする
<Home> | 最初のエントリを選択する
<End> | 最後のエントリを選択する

このプラグインは、man ページ、markdown ファイル、および端末バッファに目次を提
供することもできます。端末バッファの場合、エントリは過去に実行されたシェルコマ
ンドになります。それらを検索するために、以下のパターンが使用されます: >

^\w\+@\w\+:\f\+\$\s

これは、デフォルトの bash プロンプトにマッチするように意図されています。プロン
プトとマッチしない場合は、`g:helptoc` 辞書変数の `shell_prompt` キーを使用して
正規表現を変更できます: >

let g:helptoc = {'shell_prompt': 'regex matching your shell prompt'}

Tip: `/` コマンドで検索するパターンを挿入した後、<CR> ではなく <Esc> を押すと、
`J` または `K` を押すことで残りの各エントリの詳細なコンテキストを取得できます。

==============================================================================
2. 翻訳ヘルプ *help-translated*
Expand Down
58 changes: 57 additions & 1 deletion en/helphelp.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*helphelp.txt* For Vim version 9.1. Last change: 2024 Apr 10
*helphelp.txt* For Vim version 9.1. Last change: 2024 Nov 03


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -246,6 +246,62 @@ command: >
To rebuild the help tags in the runtime directory
(requires write permission there): >
:helptags $VIMRUNTIME/doc
<
*help-TOC* *help-toc-install*

If you want to access an interactive table of contents, from any position in
the file, you can use the helptoc plugin. Load the plugin with: >

packadd helptoc

Then you can use the `:HelpToc` command to open a popup menu.
The latter supports the following normal commands: >

key | effect
----+---------------------------------------------------------
j | select next entry
k | select previous entry
J | same as j, and jump to corresponding line in main buffer
K | same as k, and jump to corresponding line in main buffer
c | select nearest entry from cursor position in main buffer
g | select first entry
G | select last entry
H | collapse one level
L | expand one level
p | print current entry on command-line

P | same as p but automatically, whenever selection changes
| press multiple times to toggle feature on/off

q | quit menu
z | redraw menu with current entry at center
+ | increase width of popup menu
- | decrease width of popup menu
? | show/hide a help window
/ | search for pattern

<C-D> | scroll down half a page
<C-U> | scroll up half a page
<PageUp> | scroll down a whole page
<PageDown> | scroll up a whole page
<Home> | select first entry
<End> | select last entry

The plugin can also provide a table of contents in man pages, markdown files,
and terminal buffers. In the latter, the entries will be the past executed
shell commands. To find those, the following pattern is used: >

^\w\+@\w\+:\f\+\$\s

This is meant to match a default bash prompt. If it doesn't match your prompt,
you can change the regex with the `shell_prompt` key from the `g:helptoc`
dictionary variable: >

let g:helptoc = {'shell_prompt': 'regex matching your shell prompt'}

Tip: After inserting a pattern to look for with the `/` command, if you press
<Esc> instead of <CR>, you can then get more context for each remaining entry
by pressing `J` or `K`.

==============================================================================
2. Translated help files *help-translated*
Expand Down