Last active
May 20, 2018 11:54
-
-
Save geek182/da37728ce3ddc4fe8b5016ba1c86cc3f to your computer and use it in GitHub Desktop.
vim-survival-kit
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 Change each 'foo' to 'bar' in the current line. | |
:%s/foo/bar/g Change each 'foo' to 'bar' in all the lines. | |
:5,12s/foo/bar/g Change each 'foo' to 'bar' for all lines from line 5 to line 12 (inclusive). | |
Comment all lines: :%s/^/# | |
Comment lines 10 - 15: :10,15s/^/# | |
Comment line 10 to current line: :10,.s/^/# | |
Comment line 10 to end: :10,$s/^/# | |
#delete | |
#Delete Line 10 to 15 | |
:10,15d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment