^W + ^=
Make split windows equal size.@:
Repeat the last Ex command.gv
Select last visual select.=
Auto-indent.=G
Auto-indent to the end of the file.=i}
Auto-indent inside de bracket.s
Deletes the character and enters Insert mode.f
Searches for character in line.;
searches for next instance,,
searches for previous instance.*
Searches for all occurrences of word that's under the cursor.daw
Delete a word. Different fromdw
because it deletes the full word, even though the cursor is not placed on the first character.
<C-h>
Delete back one character (backspace).<C-w>
Delete back one word.<C-u>
Delete back to start of line.<C-k>
Delete forward to end of line.<C-r>
Pasted yanked text without leaving the insert mode. If yanked text contains new line characters,<C-r><C-p>0
will take care of fixing indentation issues.
- We can visually select all 3 lines and then run command
:normal A;
that will executeA;
(append ;) for each line. Alternatively, we can run same on the whole content of the file with:%normal A;
. What if we did a single modification on the first line of the above snippet appending ; at the end of the line with A;. We can repeat that command by selecting the lines 2-3 and running the dot command over visual selection with:normal
. :sort
Sorts selected lines alphabatically.
%s/foo/bar/g
Replaces foo by bar in whole file.:args app/_/scss/modules/*.scss
Loads all files in modules inargs
.:argsdo %s/replace/with/g
Replace something in all files in the arguments list.:argdo update
Save all the files in the arguments list.