Last active
June 16, 2018 06:55
-
-
Save denitram/2853276 to your computer and use it in GitHub Desktop.
vi -- handy tips
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
Copy lines 1-2 /paste after 3 | |
:1,2t3 | |
Move lines 4-5 /paste after 6 | |
:4,5m6 | |
Save lines to new file | |
:10,15w file | |
Delete blanke lines | |
:g/^$/d | |
Making a list of numbers | |
:put =range(1,20) | |
Add line numbers to source code in vim | |
:%!nl | |
Start numbering with n | |
:%nl -v n | |
Replace all characters up to first comma | |
:%s/^[^,]*,// | |
Show Hidden Characters | |
:set list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment