Last active
August 15, 2017 08:54
-
-
Save spielhoelle/996a7df19669d993700d13129831d214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim index.html open a file | |
i - go to insert mode: | |
: (just colon) access command palette: | |
:help help | |
:w write file: | |
:q quit file: | |
x - to delete the unwanted character | |
u - to undo the last the command and U to undo the whole line | |
CTRL-R to redo | |
A - to append text at the end | |
:wq - to save and exit | |
:q! - to trash all changes | |
dw - move the cursor to the beginning of the word to delete that word | |
2w - to move the cursor two words forward. | |
3e - to move the cursor to the end of the third word forward. | |
0 (zero) to move to the start of the line. | |
d2w - which deletes 2 words .. number can be changed for deleting the number of consecutive words like d3w | |
dd to delete the line and 2dd to delete to line .number can be changed for deleting the number of consecutive words | |
in case vim was not closed correctly, there is a .swp file and vim is complaining when you open it again. | |
then just delete the swap file: | |
rm .file.swp | |
rm .file.swo | |
and so on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment