⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 faq.txt

📁 nedit 是一款linux下的开发源码的功能强大的编辑器
💻 TXT
📖 第 1 页 / 共 4 页
字号:
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 one single font.NEdit is a plain text editor, not a word processor. Plain text files haveno font or formatting information contained in them, they are just a stringof ascii characters. While you might find a font with limited symbols andgreek letters, your troubles would just be beginning. You'd still havetrouble getting the printer to agree and print out the characters as theyappeared in NEdit. For anything involving font changes or special symbols,you need a word processor, such as Microsoft Word, or a text formattingprogram like LaTEX.> 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 theplain text format. In the default, auto-newline, wrapping mode, nedit doeswrapping by inserting newline characters. Because there is only one newlinecharacter, NEdit can't distinguish a newline which can be "unwrapped" fromone which the user intended to be permanent. While it might be possible forNEdit to temporarily make that distinction, for example while the cursor ison a particular line that the user is typing, ultimately, NEdit will haveto 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 theFill paragraph command.In continuous wrapping mode, you can intentionally leave out the newlineswithin paragraphs, and lines will be wrapped as needed to fit within thepage. When you edit in the middle of a paragraph, the text will becontinuously adjusted. However, continuous wrap mode has it's limitationstoo. All paragraphs must be lined up against the right margin to takeadvantage of continuous wrapping, and Unix systems have limited support forfiles of that format. You may have trouble printing and viewing the filesoutside of NEdit.> NEdit 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 controlledby how far your mouse is beyond the edge of the window. If you want it toscroll slower, bring the mouse back closer to the 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 anargument 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.> How can I print highlighted text on my printer as it appears in NEdit.In the current version, that's not possible, but there are external toolsfor highlighting, which are specifically designed for printing, includinga2ps, enscript, and genscript.SERVER MODE AND NC------------------> I use a mailer which can invoke an external editor, but if I use nc, the> mailer process continues and assumes the editor has finished, when in fact> it hasn't.nc is actually finished communicating with the NEdit server when itreturns. It's possible to create a shell command that invokes nc and thengoes to sleep, and a second script to be run from the NEdit Shell menu,which looks for the sleeping process with a matching file name and killsit. Try the shell scripts in:    ftp://ftp.nedit.org/pub/contrib/misc/nc_and_wait.tar> I started nedit (via 'nc') as root, and then later tried to edit a file as> myself with 'nc'. I was very suprised to see that a new nedit wasn't> started--rather, I was given the old nedit window, with root permissions.> Isn't this a security hole?Actually, NEdit does check who the user is. When you use the su command,however, several Unix variants return the original user name in response tothe standard C library calls for getting a user name, rather than the nameto which you have su'd. Starting with version 5.1, a different mechanism isused for getting this information, so you shouldn't see this problem anymore.In your case, my guess is that you used su to become root, then started annedit server as root. On a system which returns the original user name,both the new server and the nc client program think the user name is youroriginal user name, so the server accepts requests from both you as rootand you as you.The security of an nedit session, depends upon the security of your Xserver. Only those with access to your screen can send commands to an neditserver, but they can also send keystrokes to any nedit, or a shell window,etc... Anyhow, just upgrade to the latest NEdit version.EDITING TECHNIQUES------------------> I'd like to select a large expanse of text without dragging all the way> through it with the mouse.Using the shift key with the left mouse button, you can select all of thetext between the cursor (or an existing selection) and the mouse.    * Position the cursor at one end of the desired selection    * Use the scroll bar to make the other end visible    * Shift+Click with the left mouse button to select the text between the    cursor and the mouseAlternatively, using only keyboard navigation:    * Position the cursor at one end of the desired selection    * Type Alt-m and a letter to mark the position    * Use the keyboard to go to the other end of the desired selection    * Type Shift-Alt-g and the letter you used to mark the first end of the    selection> How can I select the text between two marks?    * Go to the first mark (Goto Mark).    * Hold the shift key while selecting Goto Mark or Alt+Shift+G to select    the text.BUGS----> The keyboard shortcuts (accelerator keys) are not working when 'Caps' or> 'Num Lock' are switched on. Have I overlooked something obvious?You haven't overlooked anything, it's a Motif design flaw. Netscapepainfully works around this and the Alt/Meta key reversal on Sunworkstations by internally re-implementing the Motif menu acceleratormechanism. NEdit will likely follow suit with the release of version 5.2.Another possibility (writes Peter Daifuku of SGI):    There's another answer which unfortunately isn't widespread as yet. For    an X11R6.3 X server supporting the XKB extension, there is a mechanism    to ignore the NumLock and CapsLock key as modifiers. The file    /usr/lib/X11/xkb/X0-config.keyboard should contain the string    IgnoreLockMods=NumLock+Lock . For systems with multiple displays,    display 1 would be controlled by the file X1-config.keyboard, etc.    On SGI systems, this mechanism is support on IRIX 6.2 with X server    patch 1574 or later, on IRIX 6.3 and IRIX 6.4 and all later releases.> Sometimes NEdit inserts <dc3> instead of saving the file when I type ^S.> Other keyboard shortcuts (accelerator keys) don't work either.You have probably NumLock or CapsLock ON. See the answer to this (#N900)question.> I use the numeric keypad really often, so I keep NumLock on. But NEdit> shortcuts don't work when NumLock is on.The bug is not in NEdit, but in Motif. This is fixed as of NEdit 5.2, butthat might not help you much. Older versions have the same problem.Here's how you tell X to interpret the keypad keys as numbers withoutturning NumLock on. Create a file .Xmodmap in your home directory, and putthe following lines in it:  keycode  79 = KP_7  keycode  80 = KP_8  keycode  81 = KP_9  keycode  83 = KP_4  keycode  84 = KP_5  keycode  85 = KP_6  keycode  87 = KP_1  keycode  88 = KP_2  keycode  89 = KP_3  keycode  90 = KP_0  keycode  91 = KP_DecimalThen make sure the script that starts your X session parses this file withthe command:  xmodmap -merge ~/.XmodmapThis script can be ~/.xinitrc (called by startx) or something like Xsessionif you use xdm/kdm/gdm. Then again, it might be an entirely differentscript on some systems.Then turn off numlock, and just continue using the keypad. The only thingis, you loose the alternate set of functions (cursor/home/pgdown/etc).> NEdit crashes I try to paste text in to a text field in a dialog (like Find> or Replace) on my SunOS system.On many SunOS systems, you have to set up an nls directory before variousinter-client communication features of Motif will function properly. BeforeNEdit 4.0 this wasn't much of a problem, because users couldn't cut andpaste at all, and Motif would sometimes print a warning about not findingan nls directory, so most users figured it out right away. But with 4.0,everything seems to be working fine, except when someone tries to move textin or out of a dialog field, then blamo.There are instructions in README.sun inftp://ftp.nedit.org/pub/<current-version<, as well as a tar file containg acomplete nls directory:ftp://ftp.nedit.org/pub/<current-version</individual/README.sunIt contains directions for setting up an nls directory, which is requiredby Motif for handling copy and paste to Motif text fields.> NEdit crashes frequently, particularly on window closing.There is an obsolete resource in Motif called defaultFontList, which doesnothing but cause random crashing. I don't know why NEdit users keeppopping up with this resource set, maybe it looks enticing when you look atwidget resources with editres. Anyhow, setting it to anything, whether itbe a valid font or just garbage, causes random crashing in both Motif 1.2and 2.0, so just don't set it.> NEdit sometimes crashes when I execute a shell command menu item I just> added.Check the "Command Input" setting, in the Preferences->Shell Commandsdialog for that menu item. If the shell command being executed does nottake input, but "Command Input" is set to "selection" or "window", NEdittries to write the input anyhow, and fails. Set "Command Input" to "none"to prevent this possibility. This is fixed in version 5.1 and later.> When NEdit starts up, I get errors:> >    Cannot allocate colormap entry for "#b3b3b3">    Cannot allocate colormap entry for "#e5e5e5"Most X displays are set up to operate in a mode which allocates 8 bits ofvideo memory per-pixel, and requires a color mapping table to translatepixel values to screen colors. With just 8 bits there are only 256 possiblecolors, and programs must either allocate and share these pixel values, orswap in their own colormap and make all other windows flash to strangecolors while their window is focused. Some programs, Netscape inparticular, are bad neighbors in this environment and snarf up every freeentry in the shared colormap, such that every program that runs after themgets the errors you're asking about.The solution is either to start Netscape last, after all other applicationsthat you might want to run, or better, tell Netscape how many colors it isallowed to allocate. Fortunately, you can do this with a resource setting:    Netscape*maxImageColors: 80> Sometimes when I use regular expression replacement inside of a rectangular> selection, NEdit fails to match text which does legally match the> expression.The problem with REs and rectangular selections is that matching is boundedby the rectangular selection, but text outside of the selection is stillfed to the matching routines, so ^, $, don't refer to the edges of theselection, they still refer to the beginning and ending of the line, andsome legal matches are excluded because they continue outside of theselection are thereby excluded, or are shadowed by matches which begin orend outside of the selection.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -