Skip to content

using_external_editors

Dan Malec edited this page Feb 1, 2021 · 1 revision

Using External Editors

ucblogo (Berkeley Logo) supports using external editors via the SETEDITOR command.

This is supported in:

  • non-wxWidgets builds - all
  • wxWidgets builds - after 2021-01-27

If the version of ucblogo you are using is relatively recent and runs in its own window as a GUI application, it is likely a wxWidgets build. If in doubt, you can check like so:

? SHOW :logoplatform
wxWidgets

The following is not a comprehensive guide to setting up external editors; but, it is intended to give a starting point for various platforms.

Non-wxWidgets Builds

Non-wxWidgets builds will attempt to set a platform sensible default for the external editor; however, they can be configured to use other available editors.

Linux

Using emacs in terminal mode:

SETEDITOR "|emacs -nw|
EDIT "foo

OSX

Using vi:

SETEDITOR "vi
EDIT "foo

wxWidgets Builds

wxWidgets builds will default to using the internal wxWidgets based editor and will not set a default value for the external editor. The SETEDITOR command can be used to select an editor available on the $PATH.

In order to return to using the built in wxWidgets editor, the editor setting can be cleared like so:

SETEDITOR "

Linux

GUI Editors

Using emacs

SETEDITOR "emacs
EDIT "foo

Console Based Editors

Using jove

SETEDITOR "|xterm -e jove|
EDIT "foo

Windows

GUI Editors

Using notepad

SETEDITOR "notepad
EDIT "foo

OSX

GUI Editors

Using TextEdit

SETEDITOR "|open -enW|
EDIT "foo

Using emacs

SETEDITOR "|open -a emacs -nW|
EDIT "foo