0

do you have any simple and working template plugin to use for programming ? I have tried this but to be honest I didn't understand how to use it. I have found this but I didn't understand how to install it.

Thank you, I gave up to install a plugin for template because it's too complicated.

1
  • Questions asking for plugin recommendations are off-topic as they tend to generate opinion-based answers. You might be able to rephrase your question as “How do I do X?” to which “try plugin Y” may be an appropriate answer.
    – D. Ben Knoble
    Jan 27, 2021 at 22:42

2 Answers 2

1

In mu-template case, that I'm maintaining, you'll have to register at least 4 plugins in your plugin manager -- yeah, I know, 4 seems a lot, but I don't like duplicating my code, and I'm dreaming of a day when people will use plugin managers that handle dependencies...

The main, required, plugins:
'LucHermitte/lh-vim-lib'
'LucHermitte/lh-style'
'LucHermitte/lh-brackets'
'LucHermitte/mu-template'

The optional one to have a multi-cursors like feature
'tomtom/stakeholders_vim'

Another optional one used in a few default snippets
'LucHermitte/lh-dev'

And I have even more snippets in lh-cpp for C++ and C
'LucHermitte/lh-cpp'

Then you also need to be aware of the old, and non-usual, approach taken in mu-template regarding placeholders as it could be really confusing.

4
  • @Luc-hermite I don't use plugin manager because they often give problems, also they're not available as package but I have to install it manually. Also in your documentation you take it for granted many things that are not granted. For example I know what is vam but you didn't say where to put that lines. I don't know what is vim-flavor and I don't want make a recursive research for 2 hours just to install a plugin for templates. I have tried to install vundle and with it others plugin but it give me around 15 errors.
    – Lews
    Dec 11, 2020 at 21:07
  • What I mean to take for granted is that the person that install my plugins has already installed other plugins, and is familiar to what he/she does usually. Either manually (in which case I list the repositories of all the dependencies), or through a plugin manager, and given the list of dependencies I provide I expect my end-user to know how to register that list. For the special case of VAM or vim-flavour users, installing my plugin will be easier. Dec 12, 2020 at 0:02
  • With VAM, once it's up and running, it could be as simple as :InstallAddons mu-template@lh once, and :ActivateInstalledAddon mu-template@lh in the .vimrc after activating VAM itself, or on demand. But it could be also much more complex when we want to support proxies. Dec 12, 2020 at 0:07
  • 1
    Anyway, just use the method you're used to with the list of plugins I provide. Dec 12, 2020 at 0:08
1

You might like UltiSnips.

It's a bit complex (but you could say most snippet plug-ins are), but you can find screen casts covering UltiSnips to help you get started with it.

You'll probably want to use the snippets from honza/vim-snippets together with UltiSnips (in fact, the UltiSnips quick start instructions mention them specifically.) They should cover a lot of the common ground, for most programming languages, and get you started quickly.

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