Tuesday, August 23, 2016

Re: Create Autocompletion snippets for Custom Code

Hi

> Is it possible to create your own autocompletion snippets using Vim
> functionalities or plugin? I have several custom code that I would
> like to create snippet for. I am using GVim on Windows. Most of
> existing autocomplete plugins like NeoComplete or YouCompleteMe etc
> do not work well on Windows. I am looking for something Vim native
> to do this.

There exist several template expander plugins that work on Window. mu-template is one of them. It's indeed 100% native (i.e. written only in viml).
-> https://github.com/LucHermitte/mu-template

If you want a smart completion, its internal completion function is available in lh-vim-lib
https://github.com/LucHermitte/lh-vim-lib/blob/master/autoload/lh/icomplete.vim#L136
(it has been inspired from YCM equivalent feature ; see http://vi.stackexchange.com/questions/5820/dynamic-completion regarding its birth)

You'll find examples of use within mu-template code base and in the accompanying documentation.

HTH,

--
Luc Hermitte

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment