Skip to content

Instantly share code, notes, and snippets.

@cuong-nguyen
Created February 17, 2021 10:16
Show Gist options
  • Select an option

  • Save cuong-nguyen/db3eacf2d59fa73e17dd625af8a42416 to your computer and use it in GitHub Desktop.

Select an option

Save cuong-nguyen/db3eacf2d59fa73e17dd625af8a42416 to your computer and use it in GitHub Desktop.
Practice vim surrounding commands
// 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