brandon1024 / cortado.vim

Import Java classes by name, find unused import statemens, and many other goodies!
MIT License
2 stars 0 forks source link

feat: creating new classes #23

Open brandon1024 opened 2 years ago

brandon1024 commented 2 years ago

Creating new classes in Vim is a bit clunky. You first have to create an empty file/buffer, then fill in the boilerplace public class <name> { ..., and then the package statement. Yuck.

We can make this a bit easier. In an empty buffer, :JavaNew [<class,enum>] [<class name>]. If a class name isn't given, prompt for it in a popup. We can also try to offer some package statement suggestions based on the path of the file/buffer. For example, if the file is /home/user/project/src/main/java/com/me/HelloWorld.java, we may offer: