Last active
June 3, 2020 03:05
-
-
Save anonimitoraf/93d60741b58ef40562595c381d351a57 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
------------------------- | |
Normal mode | |
------------------------- | |
--- Navigation --- | |
h Move cursor 1 char to the left | |
j Move cursor 1 char down | |
k Move cursor 1 char up | |
l Move cursor 1 char to the right | |
NOTE: When in Visual Char/Line/Block Mode, these navigation keys highlight stuff | |
w or e Sort of like "Ctrl ->" in typical text editors to move from word to word (I forgot the subtle diff between the 2) | |
b Counterpart of w or e, i.e. sort of like "Ctrl <-" | |
--- Deleting/Cutting/Copying stuff --- | |
dd Cut current line | |
dw Cut the word that the cursor is in | |
dt{{some_char}} Cut characters until you encounter {{some_char}}. | |
For example, dt; cut all characters until you encounter a ';' | |
df{{some_char}} Same as dt{{some_char}} but includes {{some_char}} too | |
dT{{some_char}} Same as dt{{some_char}} but the opposite way, i.e. from right to left | |
dF{{some_char}} Same as df{{some_char}} but the opposite way, i.e. from right to left | |
ct, cT, cf, cF Same as dt, dT, df, DF but after cutting, brings you to Insert Mode | |
Whereas the d counterparts make you stay in Normal Mode | |
x Cut the char the cursor is on | |
yy Copy current line | |
yt, yT, yf, yF Same as dt, dT, df, DF but copies insteads of deletes | |
p Paste | |
--- Misc --- | |
gg Go to first line of the file | |
G Go to last line of the file | |
V Normal Mode -> Visual Line Mode | |
ggVG Select all text in file | |
--- Folds --- | |
------------------------- | |
Visual Line mode | |
------------------------- | |
------------------------- | |
Visual Block mode | |
------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment