vim9-toc : Unified table of contents for Vim: folds + helptoc delegation
| script karma |
Rating 0/0,
Downloaded by 4 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Wei Chen |
| |
| script type |
| utility |
| |
| description |
* github: https://github.com/VimWei/vim9-toc
A single :Toc command that gives any buffer an interactive, hierarchical table of contents in a popup window. It delegates to Vim's built-in helptoc for the filetypes helptoc already understands, and derives an outline from Vim's own folding for everything else — so any filetype that ships a folding ftplugin (TOML, YAML, JSON, Git, Vim script, ...) works out of the box.
* Features
- One entry point for all filetypes: :Toc
- Delegates to the built-in helptoc for structured formats (help, markdown, LaTeX, HTML, AsciiDoc, man, ...)
- Fold-driven outline for anything Vim can fold (foldmethod expr / marker / syntax / indent)
- Indentation-based outline as a last resort for buffers without folding
- Extensible per-filetype "collectors" via toc#AddCollector()
- Interactive popup: navigate, jump, and collapse/expand levels |
| |
| install details |
* With vim-plug:
```vim
Plug 'VimWei/vim9-toc'
```
* Or with Vim built-in packages:
```sh
mkdir -p ~/.vim/pack/toc/start
cd ~/.vim/pack/toc/start
git clone https://github.com/VimWei/vim9-toc.git
``` |
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 216.73.216.240
|