Skip to content

Instantly share code, notes, and snippets.

@ytyubox
Created January 21, 2021 08:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ytyubox/c50340b745de0a16020dcb75271667a2 to your computer and use it in GitHub Desktop.
Save ytyubox/c50340b745de0a16020dcb75271667a2 to your computer and use it in GitHub Desktop.

Before

  Text("Hello")
  Text("world")

After apply <Leader>ai on both line selected by V

👇 cursor here
 _ {
      Text("Hello")
      Text("world")
  }
"----------add { } arround of selected lines, end in insert mode-------------"
xnoremap <leader>ai dO{<CR><Esc>Pk%kddviB>kI <C-o>h
"----------add { } arround of selected lines, end in normal mode-------------"
xnoremap <leader>an dO{<CR><Esc>Pk%kddviB>kI <Esc>h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment