You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<% - de-indent a block with () or {} (cursor on brace);
:mak[e] - execute external command makeprg and parse error messages. It's like exiting Vim, executing make in 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.).
The text was updated successfully, but these errors were encountered:
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 commandmakeprg
and parse error messages. It's like exiting Vim, executingmake
in 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.).The text was updated successfully, but these errors were encountered: