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.

Revisions

  1. cuong-nguyen created this gist Feb 17, 2021.
    34 changes: 34 additions & 0 deletions vim-surround
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    // 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!