Customizing nedit
Nedit is a simple to use text editor for linux suitable for editing text files.
Getting the delete key to work
To get the delete key to work in nedit, add
keycode 129 = 0x4 |
nedit*text*Translations: #override \n\ <Key>0x4: delete-next-character() \n |
Editor tries to execute each line of text as a command
Edit 'keymaps', change keycode 108 from `KP_Enter' to `Return' and run `xmodmap keymaps'.
Getting escape key to close windows
By default, nedit pops up an information box saying "Search string not found" after a search. It is necessary to press Enter or Space to dismiss the box.
Edit util/DialogF.c at 'addEscapeHandler' (line 369). If addEscapeHandler is called with NULL, escape key is disabled. Remove lines 368-370 and recompile. This will allow Esc to dismiss the box.
/* If the button labeled cancel or dismiss is not the cancel button, or if there is no button labeled cancel or dismiss, redirect escape key events (this is necessary because the XmNcancelButton resource in the bulletin board widget class is blocked from being reset) */ /*if (cancel_index == -1) addEscapeHandler(dialog, NULL, 0); else if (cancel_index != CANCEL_BTN) addEscapeHandler(dialog, &df, cancel_index);*/ |
Changing the default cursor
The default cursor in Nedit is a gigantic black arrow that obscures the text and can be very annoying.
- Edit source/window.c and add at the following line at the top of the file
#include <X11/cursorfont.h>
- At the top of function CreateWindow(), add
Cursor cursor;
- At the bottom of function CreateWindow() near line 527, add the two
lines shown:
restoreInsaneVirtualKeyBindings(invalidBindings); cursor = XCreateFontCursor(TheDisplay, XC_xterm); XDefineCursor(TheDisplay, XtWindow(window->textArea),cursor); return window;
Other possibilities are XC_crosshair, XC_top_left_arrow, and XC_draft_small.
Getting rid of XmPushButton errors
On my computer, nedit prints the following on the screen every time a file is opened:
Name: executeCommandLine Class: XmPushButton Illegal mnemonic character; Could not convert X KEYSYM to a keycode |
"*shellMenu.executeCommandLine.accelerator: Ctrl<Key>KP_Enter", "*shellMenu.executeCommandLine.acceleratorText: Ctrl+KP Enter", |
Back