NEdit FAQ/features

From Niki

Jump to: navigation, search

Contents

FEATURES

Can NEdit open all new documents in the same window?

rather than a new one every time

This feature was introduced in NEdit version 5.5.

What happened to drag and drop?

I'm a little confused about what happend to drag and drop. I thought drag-N-drop was supported by the Motif library.

NEdit no longer uses the Motif text widget, so all of the functionality had to be duplicated in the new widget. Drag and drop between windows got left off due to time pressure of getting out the new release, but it will be back some day.

Why don't you integrate Max Vohlken's / Yunliang Yu's versions into the official release of NEdit?

Many of their changes will eventually find their way in to the "official" version, but some will not. Max has really done quite a lot of stuff. I appreciate it, and I think it's kind of neat to have a "bleeding edge" version of NEdit around to try out new features.

I can't just apply Max's patches to our version and release it. Some of them break the VMS version, some interfere with existing commands that are important to other users, and some are just customizations that I don't particularly agree with. Mostly, I want to do a lot of testing to make sure the changes are safe on all platforms, and I just don't have time right now. (Mark Edel)

Update as of NEdit version 5.2RC1: The forthcoming NEdit version 5.2 contains several functionalities of Max's patches.

Why are there no default text values in dialogs?

A feature which is found in in some Macintosh and PC programs, which I like, is to provide pre-entered default values in text fields. For example, the find and replace dialogs could show the last search/replace string, or the currently selected text. These programs select the text, so simply typing in the field automatically replaces the default without any extra work from the user.

X has a strict convention that there can be only one selection at a time on the whole display. This means that some of the tricks used in PC and Macintosh programs don't work in X. On PCs and Macs, programs can fill in default values in text fields, and select the text that they have inserted such that If the user types over the selection, it will automatically be erased. Under X, there is a price to pay for making an automatic selection. The selection must be "stolen" from some other window, maybe some other program. If the user's intent was to paste a selection that existed before the dialog popped up, once the automatic selection is made, they are out of luck.

If NEdit automatically transferred the selection to the Find or Replace dialog, it would either have to steal the selection, or users would have to click or drag the mouse over the text to delete it before they could type anything different. Instead, NEdit has a "Find Selection" command, as well as various methods of pasting and copying the selection into dialog fields. It also allows you to recall of previous search strings in the Find and Replace dialogs via the up-arrow and down-arrow keys.

I would like to use (multiple fonts, special symbols) in my file, but NEdit seems to allow just a single font.

NEdit is a plain text editor, not a word processor. Plain text files have no font or formatting information contained in them, they are just a string of ascii characters. While you might find a font with limited symbols and greek letters, your troubles would just be beginning. You'd still have trouble getting the printer to agree and print out the characters as they appeared in NEdit. For anything involving font changes or special symbols, you need a type setting program like TeX. Then you can use NEdit to edit e.g. the LaTeX source text of your document.


Auto-wrap doesn't work very well.

When I type in the middle of a line, I can push the end of the line beyond the right margin, and when I delete, It doesn't keep the right edge of the text lined up.

You probably want continuous wrap mode (Preferences -> Wrap -> Continuous).

Because NEdit is not a word processor, it is stuck with the limits of the plain text format. In the default, auto-newline, wrapping mode, NEdit does wrapping by inserting newline characters. Because there is only one newline character, NEdit can't distinguish a newline which can be "unwrapped" from one which the user intended to be permanent. While it might be possible for NEdit to temporarily make that distinction, for example while the cursor is on a particular line that the user is typing, ultimately, NEdit will have to forget this information, because there is no way to save it in the file. Users who work in auto-newline wrap mode tend to make liberal use of the Fill paragraph command.

In continuous wrapping mode, you can intentionally leave out the newlines within paragraphs, and lines will be wrapped as needed to fit within the page. When you edit in the middle of a paragraph, the text will be continuously adjusted. However, continuous wrap mode has it's limitations too. All paragraphs must be lined up against the right margin to take advantage of continuous wrapping, and Unix systems have limited support for files of that format. You may have trouble printing and viewing the files outside of NEdit.

NEdit auto-scrolls too fast

when I extend a selection by dragging the mouse outside of the window.

NEdit features proportional auto-scrolling, where the speed is controlled by how far your mouse is beyond the edge of the window. If you want it to scroll slower, bring the mouse back closer to the text.

Is there a special symbol to represent the selection text?

Is there a special symbol (as % for filename in the shell commands) that can be used to represent the text that is selected, which can then be used as an argument to a command? For instance, I want to feed the selection to a script so that it can be used as the expression to a 'grep' command. Is there any other way that I can accomplish this goal?

Below is an example from the NEdit discussion list (from David L. Paterline) of a "Find All" command implemented by using the selection as an argument to the grep command:

I set up a command to list all lines in a file which contain the highlighted selection as follows, using the Preferences -> Shell Commands menu:

   Menu Entry:           all <selection>
   Command Input:        selection
   Command Output:       new window
   Save file before:     yes
   Shell Command:        grep -n -- "`cat -`" %

The 'cat -' portion of the command echoes the selected text to the 'grep -n' command, which lists the lines containing the selection with line numbers. The output of the command appears in a new window; I can then highlight a line number in the new window and use the Search -> Goto Selected menu in the original window to jump to the line in the original file.

Alternatively, use a macro in stead, which lets you construct your whole command string however you want (and the selection is available)

How can I print highlighted text on my printer as it appears in NEdit.

To print with syntax highlighting, use the sh2html macro, to be found here:

http://www.vranx.de/nedit/sh2html.nm.html

If you have any problems using it, contact the author at: nedit (at) thorstenhau (dot) de

.bck files don't obey my umask

When I create a file with Nedit, it uses the permissions from my umask. However, when Nedit creates a .bck backup file, it is read-write only for the owner. This means I end up leaving .bck files all over the place which noone but myself can delete.

This is intended. If the backup file followed the umask too, that would be insecure: if you are editing a confidential file, the backup copy could become readable to unauthorized users.

One could argue that the proper thing to do is to copy the original file's permission settings, but even that can be considered insecure: you may want to delete something confidential from a file, but the confidential information would still be accessible through the backup file.

It is "standard" practice to restrict access to files that are created without direct user interaction and that could contain sensitive information.

A file's permission bits are irrelevant when you want to delete it. All you need is write permission to the containing directory.

Personal tools