foldout : Outline-based folding for any filetype.
| script karma
Downloaded by 34
Comments, bugs, improvements
script versions (upload new version)
|foldout provides an outline structure based on a hierarchy of headings. A
heading is a string like `/* ## Title */`, consisting of an optional prefix
(`/*`) and suffix (`*/`), a string of heading symbols (`#`), and a title
(`Title`). The number of heading symbols determines the heading level. The
default prefix and suffix are computed from `commentstring`, so in a code file,
you can create a heading by typing your language's comment prefix followed by
heading symbols, without any per-language configuration.
foldout provides syntax highlighting of headings, automatic folding based on
the outline structure, and an additional vim mode called navigation mode, which
provides quick navigation of the outline structure.
See https://github.com/msuperdock/vim-foldout for more.
|Use your preferred installation method; for example, with vim-plug (https://github.com/junegunn/vim-plug), use:
foldout can save and restore view data; this includes cursor position, open and
closed folds, and anything else provided by vim's `viewoptions` option. To
enable this, remove any calls to `mkview` and `loadview` in your `.vimrc` and
set `g:foldout_save`. (The `mkview` and `loadview` commands need to be called
in certain sequence with foldout commands, and foldout handles this for you.)
Consider also modifying `viewoptions`, which controls which view data is saved
and restored; for example:
let &viewoptions = 'folds,cursor'
let g:foldout_save = 1
To enable entering navigation mode, bind a key to the special key sequence
`<Plug>FoldoutNavigation`. Use `map` rather than `noremap` so that
`<Plug>FoldoutNavigation` can be further expanded; for example:
map <leader>n <Plug>FoldoutNavigation
foldout is automatically enabled by default in all buffers with non-empty file
names. You can change this using the `g:foldout_files` variable.
Click on the package to download.
ip used for rating: 18.104.22.168