artur-shaik / vim-javacomplete2

DEPRECATED in favor of jc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Templates for class creation

reymalahay opened this issue · comments

Hi all,

This is more a set of a questions as opposed to an issue:

  1. Will it be possible to elaborate more on the class creation section?

  2. Will it be possible to reference UltiSnips snippets as templates?

Please advise.

Thanks in advance,
rey malahay

Hello.

Can you describe workflow of your request, how you think it should work?

hi there,

thank you for the response. by the way, vim-javacomplete2 is a great plugin.

it's not a workflow. basically, what i am asking is:

  1. In your documentation, there is a section titled 'Class creation' with a usage example that looks like this
    template:[subdirectory]:/package.ClassName extends SuperClass implements Interface(String str, public Integer i):contructor(*):toString(1)

will it be possible if you can expand on how to use this feature with a sample? for example, if i want to create a class MySecretClass in package com.secret, what is the correct order of keystrokes? will it be possible to add more details to this section?

  1. What does a typical vim-javacomplete2 template look like? Will it be possible to provide a sample?

  2. There is a plugin called UltiSnips, https://github.com/SirVer/ultisnips, which developers use to create blocks of code that they use frequently, as opposed to writing everything from scratch. Will it be possible to use UltiSnips together with vim-javacomplete2?

Please advise.

Thanks in advance,
rey malahay

Hello.

Can you describe workflow of your request, how you think it should work?

Here is quick example:

output

Also, you can specify path of the class, like so: new_package.TestClass. It will create new directory new_package and put new class in it.

Templates are here: https://github.com/artur-shaik/vim-javacomplete2/tree/master/plugin/res

It is actually not templates, but methods that generates class structure.

And about UltiSnips, you can use it, and it works on itself. I don't know how we can integrate it with jc2.

This is awesome! Thank you very much, @artur-shaik !

Here is quick example:

output

Also, you can specify path of the class, like so: new_package.TestClass. It will create new directory new_package and put new class in it.

Templates are here: https://github.com/artur-shaik/vim-javacomplete2/tree/master/plugin/res

It is actually not templates, but methods that generates class structure.

No worries. I'll figure it out. If i find a plausible use case, i will open an issue and put forward a proposal.

And about UltiSnips, you can use it, and it works on itself. I don't know how we can integrate it with jc2.

You are welcome!