Last active
August 29, 2015 14:19
-
-
Save NickersF/55e27c139b79dfba1997 to your computer and use it in GitHub Desktop.
vi lesson
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
command mode: doesnt accept illiegal command | |
o: is input mode, new line | |
Command Mode: | |
Copy/Paste/Delete: | |
[num] dd - delte line | |
[num] dw - delete word | |
x - inline delete | |
u - undo | |
[num] yy - copies lines to buffer | |
[num] yw - copies words to buffer | |
p - paste | |
shift + p - paste above | |
Insertion Commands: | |
o - input mode | |
i - input mode with insert before cursor | |
a - appends after the cursor | |
Movement Commands: | |
[num]| - got char in line | |
0 - go to beginning of line | |
$ - go to end of line | |
ctrl+u - got to top of file | |
G - go to end of file | |
[line number] shift+G - go to specific line | |
Searching the Buffer: | |
:/ - search | |
:? - another search | |
:/old-pattern/new-pattern | |
:1/$s/old-pattern/new-pattern/[gc] | |
Bottom Line Mode: | |
:w - writes file | |
:q |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment