bad6fc5e7cb19974cdfc2d99de3b600269eae2cd
software/vim.md
| ... | ... | @@ -248,6 +248,26 @@ save file as new file in dir of current buffer |
| 248 | 248 | * jump to topic - `Ctrl-]` |
| 249 | 249 | * return - `Ctrl-o` |
| 250 | 250 | |
| 251 | +## folding |
|
| 252 | +| key | desc | |
|
| 253 | +| -- | -- | |
|
| 254 | +| zf#j | creates a fold from the cursor down # lines | |
|
| 255 | +| zf/ | string creates a fold from the cursor to string | |
|
| 256 | +| zj | moves the cursor to the next fold | |
|
| 257 | +| zk | moves the cursor to the previous fold | |
|
| 258 | +| za | toggle a fold at the cursor | |
|
| 259 | +| zo | opens a fold at the cursor | |
|
| 260 | +| zO | opens all folds at the cursor | |
|
| 261 | +| zc | closes a fold under cursor | |
|
| 262 | +| zm | increases the foldlevel by one | |
|
| 263 | +| zM | closes all open folds | |
|
| 264 | +| zr | decreases the foldlevel by one | |
|
| 265 | +| zR | decreases the foldlevel to zero -- all folds will be open | |
|
| 266 | +| zd | deletes the fold at the cursor | |
|
| 267 | +| zE | deletes all folds | |
|
| 268 | +| [z | move to start of open fold | |
|
| 269 | +| ]z | move to end of open fold | |
|
| 270 | + |
|
| 251 | 271 | [using_spellcheck]: https://www.linux.com/learn/using-spell-checking-vim |
| 252 | 272 | [faq]: http://vim.wikia.com/wiki/Vim_buffer_FAQ |
| 253 | 273 | [vanilla vim]: https://stackoverflow.com/questions/16082991/vim-switching-between-files-rapidly-using-vanilla-vim-no-plugins |