|
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 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar
|
@@ -246,6 +246,62 @@ command: >
|
246 | 246 | To rebuild the help tags in the runtime directory
|
247 | 247 | (requires write permission there): >
|
248 | 248 | :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`. |
249 | 305 |
|
250 | 306 | ==============================================================================
|
251 | 307 | 2. Translated help files *help-translated*
|
|
0 commit comments