Created
February 17, 2021 10:16
-
-
Save cuong-nguyen/db3eacf2d59fa73e17dd625af8a42416 to your computer and use it in GitHub Desktop.
Practice vim surrounding commands
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
| // https://github.com/tpope/vim-surround/blob/master/doc/surround.txt | |
| // delete double quotes | |
| "Hello world!" | |
| // change [] brackets to () | |
| [123+456]/2 | |
| // change quotes to `p` tag | |
| "Look ma, I'm HTML!" | |
| // put () around condition | |
| if x>3 { | |
| // put single quotes around whee! | |
| my $str = whee!; | |
| // remove () | |
| (123+456)/2 | |
| // delete tag to make it content only | |
| <div>Yo!</div> | |
| // change double quotes to single quotes | |
| "Hello world!" | |
| // change double quotes to <p> tag | |
| "Hello world!" | |
| // put () around world text | |
| Hello world! | |
| // put {} around whole line | |
| Hello world! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment