Answer the question
In order to leave comments, you need to log in
Run vim from application like in git?
There is a need to run vim from your console java application (or any other test editor, both console and not, depending on the user's choice), for example, as in git when committing. Those. the user calls the application (by typing commands in the command line), it creates some files on the disk, and then I would like vim to automatically open and be able to edit these files.
Because if you call from getRuntime'a, then the editor will start in the background.
There is an option on the stack :
Process pr = Runtime.getRuntime().exec("gnome-terminal -e 'vim /tmp/tmpfile'");
Answer the question
In order to leave comments, you need to log in
If the program already has a console, then you can run not a terminal, but a shell:
sh -c 'vim /tmp/tmpfile'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question