Last active
January 29, 2020 11:55
-
-
Save JakobOlsson/c10d4884335e533a8894b57ebc50513f to your computer and use it in GitHub Desktop.
VIM: find line fitting pattern and change two words
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
:%s/me\(.*\)you/you\1me/g | |
# whould replace a line like; | |
# so me and awesome you, should.... | |
# with; | |
# so you and awesome me, should.... | |
## Find empty lines and add another empty line | |
:%s/^$/\r/g | |
## Find lines containing one or more spaces and delete spaces | |
:%s/^\s*$//g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment