[vim/en] add additional fold commands and visual regex; reformat

accordingly
This commit is contained in:
Keith Miyake 2022-10-09 07:44:11 -07:00
parent a52f5d2c26
commit d259c3bc42

View File

@ -59,6 +59,7 @@ specific points in the file, and for fast editing.
:%s/foo/bar/g # Change 'foo' to 'bar' on every line in the file :%s/foo/bar/g # Change 'foo' to 'bar' on every line in the file
:s/foo/bar/g # Change 'foo' to 'bar' on the current line :s/foo/bar/g # Change 'foo' to 'bar' on the current line
:%s/\n/\r/g # Replace new line characters with new line characters :%s/\n/\r/g # Replace new line characters with new line characters
:'<,'>s/foo/bar/g # Change 'foo' to 'bar on every line in the current visual selection
# Jumping to characters # Jumping to characters
@ -196,10 +197,21 @@ A few important examples of 'Verbs', 'Modifiers', and 'Nouns':
# Fold text # Fold text
zf # Create fold from selected text zf # Create fold from selected text
zd # Delete fold on the current line
zD # Recursively delete nested or visually selected folds
zE # Eliminate all folds in the window
zo # Open current fold zo # Open current fold
zO # Recursively open nested or visually selected folds
zc # Close current fold zc # Close current fold
zC # Recursively close nested or visually selected folds
zR # Open all folds zR # Open all folds
zM # Close all folds zM # Close all folds
za # Toggle open/close current fold
zA # Recursively toggle open/close nested fold
[z # Move to the start of the current fold
]z # Move to the end of the current fold
zj # Move to the start of the next fold
zk # Move to the end of the previous fold
``` ```
## Macros ## Macros