Created
February 16, 2018 02:01
-
-
Save mauricios/4f9ba48c279ec0109db3c3b498e0a709 to your computer and use it in GitHub Desktop.
Vim powers
This file contains hidden or 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
- Search and replace: :%s/foo/bar/g | |
- Delete text block: ma + d'a | |
- Macro: qd, <commands>, then q, apply with @d and @@ | |
- Write as sudo: :w !sudo tee % | |
- Increase/Decrease number: Ctl+A Ctl+X | |
- Go to end of file: G | |
- Copy/Paste text block: [m]+[x], [y]+[']+[x] and [p] | |
- Open in insert mode: vi +%d +star filename.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment