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?

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

1 Answer 1

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)...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.