-
-
Notifications
You must be signed in to change notification settings - Fork 361
Open
Description
There are some useful commands:
:ba[ll]- edit all buffers as horizontal windows;<%- de-indent a block with () or {} (cursor on brace);:mak[e]- execute external commandmakeprgand parse error messages. It's like exiting Vim, executingmakein terminal, and reopening the file(s), but with error logs in the quickfix window;g?- Rot13 encode up to motion. I'm not sure this command is useful.
There are other flags for the :s[ubstitude] command:
:%s[ubstitute]/old/new- replace all "old" first occurrences within lines with "new" throughout file:%s[ubstitute]/old/new/i- replace all "old" first occurrences within lines with "new" throughout file (ignore case)
Also one can use different ranges, not only "%" which means the entire buffer:
:12,26s/old/new/g- replace all "old" with "new" from 12th to 26th lines inclusively;:31s/old/new/g- replace all "old" with "new" in the 31st line;:s/old/new/g- replace all "old" with "new" in the line under the cursor.
These ranges may be used for other commands (e. g. :d, :>, etc.).
Metadata
Metadata
Assignees
Labels
No labels