Search Unity

External Editor Arguments issue

Discussion in 'Linux' started by Aim-Here, Aug 26, 2015.

  1. Aim-Here

    Aim-Here

    Joined:
    Aug 26, 2015
    Posts:
    1
    When trying to set up an external editor, the values in the 'External Script Editor Args' field in the 'External Tools' section of the Preferences screen are passed wholesale to the external editor as one big argument, rather than split into separate space-delimited arguments, the way that most command lines would do it.

    For example, if I, being a hopeless emacs cripple, want to use emacsclient to send files to a running emacs instance, or fire up a new emacs window if emacs isn't already running - something like the way MonoDevelop ordinarily behaves with Unity - I'd expect to put something like

    --alternate-editor=emacs +$(Line):1 "$(File)"

    in the box, and have the arguments passed to emacsclient as three separate ones , such as ("--alternate-editor=emacs", "+69:1", "\"/home/wibble/UnityProject/Assets/foobar.cs\"").

    However, currently, it'll just send one argument ("--alternate-editor=emacs +69:1 \"/home/wibble/UnityProject/Assets/foobar.cs\"") to the editor, which then either fails outright if it can't find an emacs server, or uselessly tries to open the whole command line as a filename, if it can.

    The upshot is that putting almost anything other than $(File) in there is futile, and the external editor feature is a chunk less useful than it could easily be/already is on Windows. I expect this is also a problem for users of other, lesser, editors too, though maybe they're not as Monodevelop-averse as I am, and switching editors wasn't the very first thing they did with the shiny new Linux Unity.

    (Running the .deb version of Unity 5.1.0f3 on Debian Sid, but this isn't the sort of issue that's usually distro-specific).
     
  2. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    Thanks, we'll investigate.
     
  3. danl1240

    danl1240

    Joined:
    Oct 3, 2016
    Posts:
    3
    Ping....

    I'm having similar issues on macOS Unity 2017.1.05b5 and was wondering if there was any fix/workaround?
     
  4. c301

    c301

    Joined:
    Nov 19, 2016
    Posts:
    1
    ping
     
  5. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    Sorry for the delayed response - we've reworked this for an upcoming release.
     
    Aim-Here likes this.