Could this be made into a simple extension of JTextArea? It could be called VimTextArea. Then other applications can easily incorporate it into any Swing app. Or maybe a set of key bindings for JTextArea? This could be a new project.
This brings up a JEditorPane (JTextArea isn't enough) with jVi installed. This is built from the jvi-cmd directory, using the jars from jvi-core and jvi-swing.
This is minimal.
Also see README.
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can't get it to build with openjdk 8, 11, 17, or 21. The README mentions 11 - 15 & 19. The build output mentions 8 & 11. It's not clear what is required to build it. This is the output of the build with 21:
Downloaded fresh source from http://hg.code.sf.net/p/jvi/code into jvi-code
did
JAVA_HOME=/ref/openjdk/jdk-11 ./gradlew run
The first time I tried, I didn't set JAVA_HOME and ran into trouble (but something different from what you saw; tried again from scratch).
It works OK here, I'm not sure what else I might have locally that would come into play. In ~/.gradle, after building, I see that namedservices-merge is download into the gradle cache, with a bunch of files by doing find ~/.gradle | grep '/named'
O-kay, so when I ran the build again today, it just worked. I didn't make any changes. It displayed the test window and everything. Thanks for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Cool. Note that the jvi build produces jar files that run under jdk-11, but language constructs from jdk-19 can be used (frgaal magic).
Note that you can do java -jar dist/jvi.jar to bring up the test window.
jvi.jar should have everything needed to link/build against. It contains the jvi-core and jvi-swing jars along with various jars. Depending on your needs you might want to use individual jars, rather than the bundle.
To get started, depending on your needs, you could copy the source in jvi-cmd to your own tree/packages. And use that with jvi.jar.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Check out the jVi source, see https://sourceforge.net/p/jvi/code/, and in the top level directory do
This brings up a
JEditorPane(JTextArea isn't enough) with jVi installed. This is built from the jvi-cmd directory, using the jars from jvi-core and jvi-swing.This is minimal.
Also see README.
I can't get it to build with openjdk 8, 11, 17, or 21. The README mentions 11 - 15 & 19. The build output mentions 8 & 11. It's not clear what is required to build it. This is the output of the build with 21:
That's weird. The plugin, and instructions on how to use it are at
https://plugins.gradle.org/plugin/com.raelity.namedservices-merge
I'll take a look.
There's https://sourceforge.net/p/jvi/raelity-gradle/ which is the source I used to build the plugin. But the following would indicate that you can ignore that.
I just tried moving aside
~/.gradle<mvn-repo>/com/raelity/namedservices-merge3,
<mvn-repo>/com/raelity/gradle<mvn-repo>/org/frgaalDownloaded fresh source from
http://hg.code.sf.net/p/jvi/codeintojvi-codedid
JAVA_HOME=/ref/openjdk/jdk-11 ./gradlew runThe first time I tried, I didn't set JAVA_HOME and ran into trouble (but something different from what you saw; tried again from scratch).
It works OK here, I'm not sure what else I might have locally that would come into play. In ~/.gradle, after building, I see that namedservices-merge is download into the gradle cache, with a bunch of files by doing
find ~/.gradle | grep '/named'The output is
O-kay, so when I ran the build again today, it just worked. I didn't make any changes. It displayed the test window and everything. Thanks for your help.
Cool. Note that the
jvibuild produces jar files that run under jdk-11, but language constructs from jdk-19 can be used (frgaal magic).Note that you can do
java -jar dist/jvi.jarto bring up the test window.jvi.jarshould have everything needed to link/build against. It contains thejvi-coreandjvi-swingjars along with various jars. Depending on your needs you might want to use individual jars, rather than the bundle.To get started, depending on your needs, you could copy the source in
jvi-cmdto your own tree/packages. And use that withjvi.jar.I'm wrong about library jars being included in
jvi.jar. Everything in is thejvi-code/distdirectory, the libraries are injvi-code/dist/lib