Is it possible to queue up commands? For example, (this is extremely contrived), could I type something like:
:vsp, q
To open a vertical split and then quit it immediately?
gg | G. These commands let you move around the entire file. gg will move you to the first line in the file, and G will move you to the last line in the file. Alternatively, if you type nG where n is a number, you'll jump to that to that line.
If you press "F", Vim will move the cursor backwards instead of forward. Given the previous sentence, if pressed "Fq", and the cursor was at the end of the line, it would move to the "q" in "quick".
dw will delete from cursor to beginning of next word, so will not delete the entire current word under the cursor unless the cursor happens to be at the beginning of the word. So bdw will delete the whole word and the space(s) after it (unless the cursor is already at the beginning of the word).
It can be used to edit all kinds of plain text. It is especially useful for editing programs. There are a lot of enhancements above Vi: multi level undo, multi windows and buffers, syntax highlighting, command line editing, filename completion, on-line help, visual selection, etc..
You can execute more than one command by placing a | between two commands.
For example:
%s/htm/html/c | %s/JPEG/jpg/c | %s/GIF/gif/c
Source: vim wiki
You can, use a |
between the commands.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With