Ubuntu: How to open scripts from Second Life viewer into console vim



Question:

I want everything that has to do with text to be edited within console vim with tabs.

My problem is that I can't open files in console vim from GUI, I can only open them in gvim. Does anyone know how I can do such a thing?

For example my most frequent issue is with a game called Second Life. In this game you can write scripts and it gives you the option to edit your scripts in External editors. I want my external editor to be console vim. These are the instructions from the game: ExternalEditor: Path to program used to edit LSL scripts and XUI files, e.g.: /usr/bin/gedit --new-window "%s". so when I put: "/usr/bin/X11/gvim" "%s" it works for gvim, but it opens a new one each time I edit a new script AND this doesn't work at all for console vim. I tried vim server, but it was a failure.

If someone knows how to do what I want, please share.

Thanks in advance.


Solution:1

Okay, I guess the instructions that I read for vim server were not accurate. After digging a bit more into it, I found a line that works. I Initialized a vim server with the following command in terminal:

vim --servername LSLEditor

And then in the Second Life viewer external editor text I put:

/usr/bin/X11/vim --servername LSLEditor --remote-tab "%s"

Since this answer is more directed to Second Life I will Change the title so if someone else wants to do the same, they can find the answer here.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »