Wednesday, August 24, 2016

Re: Create Autocompletion snippets for Custom Code

Thanks Luc.

I am looking into that. I am beginner/intermediate level of Vim user. And I find it really hard to add my own custom snippet in the mu-template. Can you give me some ideas of how to add simple snippets.

For example
-----------

I would like to add the following for the trigger `openr`.

OPENR, unit, filename, /GET_LUN

cursor here

CLOSE, unit
FREE_LUN, unit



On Tuesday, August 23, 2016 at 4:51:11 PM UTC-5, Luc Hermitte wrote:
> 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