1

I have YouCompleteMe installed; however that only complete certain words or phrases. I am looking for something similar in VSCode or Emacs' Yasnippet. For example, if I type if, then press Tab, then a snippet of the if statement would get inserted like this:

if($1){
  $2
}

where $1 and $2 are my cursor placeholders. I navigate between them with Tab. Is there anything like this for vim?

mle0312
  • 341
  • 2
  • 12
  • 1
    Try ultisnips. It does what you want and much more. Also it had good integration with YouCompleteMe. https://github.com/SirVer/ultisnips – Dmitry Aug 16 '20 at 12:35

1 Answers1

2

All snippets plugins provide this feature. COC.nvim provides contextualized completion + snippets (given you've installed and configured a LSP server and a subplugin for snippets). My lh-cpp plugin provides idiomatic C++ snippets and wizards (through mu-template)...

Luc Hermitte
  • 17,351
  • 1
  • 33
  • 49