Page 1 of 2

How to use external editor like vim with VREP?

Posted: 20 Jun 2015, 13:42
by arp
Hi,

I tried to set the external editor in the user settings dialog. But it does not work. I want to set gvim or gedit as the editor.

Both my gvim and gedit files are in /usr/bin/. But when I go to that folder using the "Select" button next to the External Script Editor box in the User Setting dialog, I can't locate these two executables.

So I set my editor as normal vim. But that too does not work. Which external editor do work with VREP?

Cheers
-Anuraj

Re: How to use external editor like vim with VREP?

Posted: 22 Jun 2015, 09:33
by coppelia
Hello Anuraj,

you can try to directly edit the file system/usrset.txt: there, edit entries:
  • useExternalScriptEditor
  • externalScriptEditor
Cheers

Re: How to use external editor like vim with VREP?

Posted: 23 Jun 2015, 12:47
by arp
Hi,

Thanks. It now work for the the child-scripts(both threaded and non-threaded). But for some reason the customization script still opens with the default editor.

-Anuraj

Re: How to use external editor like vim with VREP?

Posted: 23 Jun 2015, 19:33
by coppelia
Yes, this is normal: the customization script editor is an exception, since it needs to run in modal mode (i.e. will block V-REP while open (customization scripts also will be blocked). This is important, because as soon as you close the customization script editor, the customization script will be reinitialized and start running constantly.

Cheers

Re: How to use external editor like vim with VREP?

Posted: 26 Jun 2019, 08:45
by fayyu
I am unable to find useExternalScriptEditor and externalScriptEditor in usrset.txt in the latest versions of V-REP.

Re: How to use external editor like vim with VREP?

Posted: 27 Jun 2019, 06:43
by coppelia
Hello,

it was removed by inadvertance. It should be available again in V-REP V3.6.2
This time however, you just need to set value externalScriptEditor (useExternalScriptEditor is not required)

Cheers

Re: How to use external editor like vim with VREP?

Posted: 10 Oct 2019, 10:41
by pr0t0z
Hello,

I just installed the latest version (3.6.2 rev.0) because of this, but this option is still not available.
Should we expect this in a future revision of this version still?

Re: How to use external editor like vim with VREP?

Posted: 15 Oct 2019, 10:01
by coppelia
Hello,

yes, it should work again from V3.6.2 upwards. You'll have to edit the file system/usrset.txt, adjust variable externalScriptEditor to something like:

Code: Select all

externalScriptEditor = "C:\Program Files (x86)\Notepad++\notepad++.exe"
Cheers

Re: How to use external editor like vim with VREP?

Posted: 22 Oct 2019, 16:05
by pr0t0z
Hello Coppelia,

I tried your suggestion but I cannot get an external editor to work.
When I try to open the 'ResizableFloor_5_25' customization script I get the following:

With notepad++ I get the following warning
externalScriptEditor = "C:\Program Files\Notepad++\notepad++.exe"
Image

With vscode I get the following output
externalScriptEditor = "C:\Users\Me\AppData\Local\Programs\Microsoft VS Code\Code.exe"
Image

Do I need to edit the variable 'defaultDirectoryForExternalScriptEditor = // absolute path, e.g. d:/myScriptTempFiles (or leave emp' ?
If so, to what value?

Thanks,

Re: How to use external editor like vim with VREP?

Posted: 24 Oct 2019, 15:34
by coppelia
That is strange. I haven't encountered that problem before. Can you try to also adjust following variable in the same file: defaultDirectoryForExternalScriptEditor. Set the location to a place where you know you have write access without admin privileges.

Cheers