Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

Using External Editors (Motif)


If you wish to use more sophisticated editing features on Motif platforms, you can create an IDLDE macro to open a file that is currently open in the IDL Editor in another editor such as emacs or vi. Use the following procedure to create a macro:

  1. Select Macros ® Edit menu to bring up the Edit Macros dialog box. You can use this dialog to create, edit, or remove macros.
  2. Complete the fields in the Edit Macros dialog:
    • Name: The name that you wish to appear in the Macros list in the Edit Macros dialog. For example, enter Edit in emacs.
    • Label: The name that you wish to appear on the Macros menu. For example, enter emacs.
    • Bitmap: The bitmap to use as the toolbar button label. Use the file paths and file name extensions discussed in Bitmaps for Control Panel Buttons.
    • Status bar text: The text that appears in the status bar when the mouse is help over the menu item or toolbar button.
    • Tip text: The text for the tool tip that appears when the mouse is held over the toolbar button.
    • IDL command: The IDL command to execute when the macro is selected. To create a macro for editing in Emacs, enter the following:
    • SPAWN, 'emacs +%L %P &' 
      
    • Select the Menu and/or Toolbar checkbox to specify whether the macro will appear in the Macros menu and/or the toolbar.
  3. Create the new macro by pressing the Add button. If you entered emacs in the Label field, a new "emacs" macro is added to the Macros list.
  4. To add a macro for editing in vi, repeat the above steps, but enter the following in the "IDL command" field:
  5. SPAWN, 'xterm -e vi +%L %P &' 
    

To use the new macros, open the desired file in the IDL editor, then select the desired Macros menu item or toolbar button.

The IDLDE always checks if the current file has been externally modified before using it. If a file was modified with an external editor, IDLDE notifies you, and asks you to reload the file before using it (you can also use the Revert to Saved option from the File menu to reload the file).


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]