Customizing NEdit
From Niki
Users can change a lot more things in NEdit than what the built-in help tells you (but do have a good look at that too).
You will need to know how to set X Resources, though.
Here are some nice tricks:
Contents |
Visual Tweaks
Motif has to be clobbered pretty hard to not be ugly, but it's possible. -- Scott J. Tringali
- Icons for your window manager / desktop environment
- Color coding NEdit sessions
- Tutorial on making NEdit prettier: How to take 15 years off NEdit's looks
- Color Schemes
- Also check X Resources for Motif color resource management under KDE
Enable tearing off submenus
Very useful for having a palette of selected macros on your desktop:
*XmMenuShell.XmRowColumn.tearOffModel: XmTEAR_OFF_ENABLED
Multi-column menus
If you have a lot of language modes or highlight styles installed, you might encounter problems with menus so long they trail off the screen. These settings will fix that (pick the ones that apply to your problem, and of course adjust the number if necessary:
*languageModes.packing: XmPACK_COLUMN
*languageModes.numColumns: 2
*highlightStyles.packing: XmPACK_COLUMN
*highlightStyles.numColumns: 2
Alternative replace dialog
The NEdit source also contains an alternative design of the replace dialog, which some people prefer. To try it out, compile Nedit with the -DREPLACE_SCOPE flag. There's a separate page about the ReplaceDialog, explaining the rationale behind both versions and the reason there are two of them.
Key binding
You can alter keyboard commands and shortcuts more radically than what the dialogs in NEdit offer. This can be extremely useful, especially for replacing builtin commands with your own macro implementations.
Here are some examples of changing the key bindings and mouse settings in what should become a whole KeybindingTutorial. An older external draft by JoFi is still there: key binding tutorial
Notice that you can bind macros via the macro_menu_command() action routine to mouse actions, too. Here are NEdit's default KeyBindings and MouseSettings.
Syntax highlighting patterns
- see PatternSets for where to get them
- see Syntax Highlighting Patterns for how to hack them.
!Fix that giant menu font!
The default main app font for NEdit may show up as a large monospaced Courier font. To fix that, you need to start up nedit with the following command:
nedit -xrm '*fontList: -*-helvetica-medium-r-normal-*-*-80-*-*-*-*-*-*'
If 80 is too small, you might try 100 or 120. You can choose any font you like by using the xfontsel program to choose one.
To make it easier to run that command, I store it in a file (~/bin/my_nedit), and then source that file (. ;/bin/my_nedit &) to run nedit.
(See X Resources for other ways to set this resource value.)
