## How to use external editor like vim with VREP?

Typically: "How do I... ", "How can I... " questions
arp
Posts: 28
Joined: 18 Dec 2014, 10:41

### How to use external editor like vim with VREP?

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

coppelia
Posts: 7396
Joined: 14 Dec 2012, 00:25

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

Hello Anuraj,

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

arp
Posts: 28
Joined: 18 Dec 2014, 10:41

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

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

coppelia
Posts: 7396
Joined: 14 Dec 2012, 00:25

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

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

fayyu
Posts: 10
Joined: 15 Aug 2017, 21:38

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

I am unable to find useExternalScriptEditor and externalScriptEditor in usrset.txt in the latest versions of V-REP.

coppelia
Posts: 7396
Joined: 14 Dec 2012, 00:25

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

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

pr0t0z
Posts: 24
Joined: 21 Nov 2014, 17:29

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

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?

coppelia
Posts: 7396
Joined: 14 Dec 2012, 00:25

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

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

pr0t0z
Posts: 24
Joined: 21 Nov 2014, 17:29

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

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

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

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

Thanks,

coppelia