-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Q: Tweak makeprg #21
Comments
Do you maybe mean launching |
When I enable this plugin and open kotlin file in vim it takes care about compiling .kt file into .class file (with Kt suffix). If I create
and open it in vim (with
What I propose is to simplify running this class with |
What do you mean by this? There's no code in this plugin that invokes the Kotlin compiler, which makes me wonder how exactly are you getting .class files without launching the compiler manually. |
Something compiling it alright. |
|
OK, thanks for the clarification. I would actually wait until KT-27171 is implemented, at which point the burden of deciding how is the executable file named and in what package it lies will be completely on the |
Yes, this should fit the bill. That feature strikes me as more elegant solution. |
I don't have any estimates at this point, since we've only started planning 1.4/1.3.x recently and we don't know the complete picture of what's to be done yet. I can only say that I am personally encouraged by the possibility of a more user-friendly Kotlin CLI, and will do my best to implement KT-27171 as soon as I have an opportunity, at the very least to improve my own UX when working with Kotlin. |
This is really great, looking forward to it. |
How do you feel about adding support for appropriate
makeprg
into this plugin?Something like this should do:
(
%
filename:r
remove extensiongs?^.?\\u&?
- capitalise first letter (hello - Hello) - same as in/^./\u&/gs
Kt
- add to the end)
This will cover scripts without specified package:
:!java -cp .:/usr/local/Cellar/kotlin/1.3.10/libexec/lib/kotlin-stdlib.jar HelloKt
But sure this can be extended with something like
:echo substitute(getline(1), ‘package ‘, ‘’, ‘’)
.I'm not totally clear on how to get kotlin stdlib path. We can try to guess it or require user to set env variable to the kotlin install dir.
The text was updated successfully, but these errors were encountered: