3 ms·
Other "z" commands (these are the ones I always get mixed up): :setlocal spell spelllang=en_us - turn on spell check z= - bring up list of suggestions
by Jach 15y ago
Other "z" commands (these are the ones I always get mixed up):
:setlocal spell spelllang=en_us - turn on spell check
z= - bring up list of suggestions
zg - add word to dict
zug - undo add to word
zw - mark as wrong
zuw - undo wrong
:help fold
zf<motion> - create fold (common motions '%', 'a{', 'a(' )
zo - open fold
zA - open folds recursively
zc - close fold
zd - forget fold
zj - move to next fold
zk - move to prev fold (up)
- re_todd 15y agoYeah, I like the fold commands, which I barley discovered a few weeks ago. I typically do "set foldmethod=indent" then pres "zr" multiple times until I'm at the fold level I want. Then I can just do "zo" on the parts of code I'm interested in.
- jamesrcole 15y agothere's also zR - Open all folds zM - Close all folds zO - Open all folds under the cursor recursively zC - Close all folds under the cursor recursively zX - Undo manually opened and closed folds: re-apply 'foldlevel'.
- Nick_C 15y agoSome simple mnemonics might help you out. zg g = Good word, add to personal dict zug Undo Good word. zw obviously, Wrong word. ... zo Open zA open All zc Close zj uses the same movement as the j key zk ditto Once you have the mnemonics sorted, sometimes you find you can remember the others because they are the ones "left out" of those with mnemonics, like zd doesn't have a mnemonic, so the command left over is "forget fold", so zd is that one. After a while, muscle memory takes over.