📄 resources.html
字号:
<HTML><HEAD><TITLE> Customizing </TITLE></HEAD><BODY><A NAME="X_Resources"></A><H2> X Resources </H2><P>NEdit has additional options to those provided in the Preferences menu whichare set using X resources. Like most other X programs, NEdit can becustomized to vastly unnecessary proportions, from initial window positionsdown to the font and shadow colors of each individual button (A completediscussion of how to do this is left to books on the X Window System). Keybinding (see "<A HREF="binding.html#Key_Binding">Key Binding</A>" is one of the most useful of these resourcesettable options.</P><P>X resources are usually specified in a file called .Xdefaults or .Xresourcesin your home directory (on VMS this is sys$login:decw$xdefaults.dat). Onsome systems, this file is read and its information attached to the X server(your screen) when you start X. On other systems, the .Xdefaults file isread each time you run an X program. When X resource values are attached tothe X server, changes to the resource file are not available to applicationprograms until you either run the xrdb program with the appropriate file asinput, or re-start the X server.</P><P><H3>Selected X Resource Names</H3></P><P>The following are selected NEdit resource names and default values for NEditoptions not settable via the Preferences menu (for preference resource names,see your NEdit preference file):</P><P><PRE><B>nedit.tagFile</B>: (not defined) </PRE></P><P>This can be the name of a file, or multiple files separated by a colon (:)character, of the type produced by Exuberant Ctags or the Unix ctagscommand, which NEdit will load at startup time (see <A HREF="#ctags">ctag support</A> ). The tagfile provides a database from which NEdit can automatically open filescontaining the definition of a particular subroutine or data type.</P><P><PRE><B>nedit.alwaysCheckRelativeTagsSpecs: True</B></PRE></P><P>When this resource is set to True, and there are tag files specified (withthe nedit.tagFile resource, see above) as relative paths, NEdit will evaluatethese tag value paths whenever a file is opened. All accessible tag fileswill be loaded at this time. When this resource value is False, relative pathtag specifications will only be evaluated at NEdit startup time.</P><P><PRE><B>nedit.shell</B>: /bin/csh </PRE></P><P>(Unix systems only) The Unix shell (command interpreter) to use for executingcommands from the Shell menu</P><P><PRE><B>nedit.wordDelimiters</B>: .,/\\`'!@#%^&*()-=+{}[]":;<>?</PRE></P><P>The characters, in addition to blanks and tabs, which mark the boundariesbetween words for the move-by-word (Ctrl+Arrow) and select-word (doubleclick) commands. Note that this default value may be overridden by thesetting in Preferences -> Default Settings -> Language Modes....</P><P><PRE><B>nedit.remapDeleteKey</B>: False</PRE></P><P>Setting this resource to True forcibly maps the delete key to backspace. Thiscan be helpful on systems where the bindings have become tangled, and inenvironments which mix systems with PC style keyboards and systems with DECand Macintosh keyboards. Theoretically, these bindings should be made usingthe standard X/Motif mechanisms, outside of NEdit. In practice, someenvironments where users access several different systems remotely, can bevery hard to configure. If you've given up and are using a backspace keyhalfway off the keyboard because you can't figure out the bindings, set thisto True.</P><P><PRE><B>nedit.typingHidesPointer</B>: False</PRE></P><P>Setting this resource to True causes the mouse pointer to be hidden when youtype in the text area. As soon as the mouse pointer is moved, it will reappear. This is useful to stop the mouse pointer from obscuring text.</P><P><PRE><B>nedit.overrideDefaultVirtualKeyBindings</B>: Auto</PRE></P><P>Motif uses a virtual key binding mechanism that shares the bindings betweendifferent Motif applications. When a first Motif application is started, itinstalls some default virtual key bindings and any other Motif application that runs afterwards, simply reuses them. Obviously, if the firstapplication installs an invalid set, all others applications may have problems.</P><P>In the past, NEdit has been the victim of invalid bindings installed by other applications several times. Through this resource, NEdit can be instructedto ignore the bindings installed by other applications, and use its ownprivate bindings. By default, NEdit tries to detect invalid bindingsand ignore them automatically (Auto). Optionally, NEdit can be told toalways keep the installed bindings (Never), or to always override them(Always).</P><P><PRE><B>nedit.stdOpenDialog</B>: False</PRE></P><P>Setting this resource to True restores the standard Motif style of Opendialog. NEdit file open dialogs are missing a text field at the bottom ofthe dialog, where the file name can be entered as a string. The field isremoved in NEdit to encourage users to type file names in the list, anon-standard, but much faster method for finding files.</P><P><PRE><B>nedit.bgMenuButton</B>: ~Shift~Ctrl~Meta~Alt<Btn3Down></PRE></P><P>Specification for mouse button / key combination to post the background menu(in the form of an X translation table event specification). The eventspecification should be as specific as possible, since it will override lessspecific translation table entries.</P><P><PRE><B>nedit.maxPrevOpenFiles</B>: 30</PRE></P><P>Number of files listed in the Open Previous sub-menu of the File menu.Setting this to zero disables the Open Previous menu item and maintenance ofthe NEdit file history file.</P><P><PRE><B>nedit.printCommand</B>: (system specific)</PRE></P><P>Command used by the print dialog to print a file, such as, lp, lpr, etc..The command must be capable of accepting input via stdin (standard input).</P><P><PRE><B>nedit.printCopiesOption</B>: (system specific)</PRE></P><P>Option name used to specify multiple copies to the print command. If theoption should be separated from its argument by a space, leave a trailingspace. If blank, no "Number of Copies" item will appear in the print dialog.</P><P><PRE><B>nedit.printQueueOption</B>: (system specific)</PRE></P><P>Option name used to specify a print queue to the print command. If theoption should be separated from its argument by a space, leave a trailingspace. If blank, no "Queue" item will appear in the print dialog.</P><P><PRE><B>nedit.printNameOption</B>: (system specific)</PRE></P><P>Option name used to specify a job name to the print command. If the optionshould be separated from its argument by a space, leave a trailing space. Ifblank, no job or file name will be attached to the print job or banner page.</P><P><PRE><B>nedit.printHostOption</B>: (system specific)</PRE></P><P>Option name used to specify a host name to the print command. If the optionshould be separated from its argument by a space, leave a trailing space. Ifblank, no "Host" item will appear in the print dialog.</P><P><PRE><B>nedit.printDefaultQueue</B>: (system specific)</PRE></P><P>The name of the default print queue. Used only to display in the printdialog, and has no effect on printing.</P><P><PRE><B>nedit.visualID</B>: Best</PRE></P><P>If your screen supports multiple visuals (color mapping models), thisresource allows you to manually choose among them. The default value of"Best" chooses the deepest (most colors) visual available. Since NEdit doesnot depend on the specific characteristics of any given color model, Bestprobably IS the best choice for everyone, and the only reason for settingthis resource would be to patch around some kind of X server problem. Theresource may also be set to "Default", which chooses the screen's defaultvisual (often a color-mapped, PseudoColor, visual for compatibility witholder X applications). It may also be set to a numeric visual-id value (usexdpyinfo to see the list of visuals supported by your display), or a visualclass name: PseudoColor, DirectColor, TrueColor, etc..</P><P>If you are running under a themed environment (like KDE or CDE) that placesits colors in a shallow visual, and you'd rather have that color schemeinstead of more colors available, then you may need set the visual to"Default" so that NEdit doesn't choose one with more colors. (The reasonfor this is: if the "best" visual is not the server's default, then NEditcannot use the colors provided by your environment. NEdit will fall back toits own default color scheme.)</P><P><PRE><B>nedit.installColormap</B>: False</PRE></P><P>Force the installation of a private colormap. If you have a humble 8-bitcolor display, and netscape is hogging all of the color cells, you may wantto try turning this on. On most systems, this will result in colors flashingwildly when you switch between NEdit and other applications. But a fewsystems (SGI) have hardware support for multiple simultaneous colormaps, andapplications with installed colormaps are well behaved.</P><P><PRE><B>nedit.findReplaceUsesSelection</B>: False</PRE></P><P>Controls if the Find and Replace dialogs are automatically loaded with thecontents of the primary selection.</P><P><PRE><B>nedit.stickyCaseSenseButton</B>: True</PRE></P><P>Controls if the "Case Sensitive" buttons in the Find and Replace dialogs andthe incremental search bar maintain a separate state for literal and regularexpression searches. Moreover, when set to True, by default literal searchesare case insensitive and regular expression searches are case sensitive. Whenset to False, the "Case Sensitive" buttons are independent of the "RegularExpression" toggle.</P><P><PRE><B>nedit.printDefaultHost</B>: (system specific)</PRE></P><P>The node name of the default print host. Used only to display in the printdialog, and has no effect on printing.</P><P><PRE><B>nedit.multiClickTime</B>: (system specific)</PRE></P><P>Maximum time in milliseconds allowed between mouse clicks within double andtriple click actions.</P><P><PRE><B>nedit*scrollBarPlacement</B>: BOTTOM_LEFT</PRE></P><P>How scroll bars are placed in NEdit windows, as well as various lists andtext fields in the program. Other choices are: BOTTOM_RIGHT, TOP_LEFT, orTOP_RIGHT.</P><P><PRE><B>nedit*text.autoWrapPastedText</B>: False</PRE></P><P>When Auto Newline Wrap is turned on, apply automatic wrapping (whichnormally only applies to typed text) to pasted text as well.</P><P><PRE><B>nedit*text.heavyCursor</B>: False</PRE></P><P>For monitors with poor resolution or users who have difficulty seeing thecursor, makes the cursor in the text editing area of the window heavier anddarker.</P><P><PRE><B>nedit*text.cursorVPadding</B>: 0</PRE></P><P>Number of lines to keep the cursor away from the top or bottom line of the window. Keyboard operations that would cause the cursor to get closer thanthis distance cause the window to scroll up or down instead, except at the beginning of the file. Mouse operations are not affected.</P><P><PRE><B>nedit*text.blinkRate</B>: 500</PRE></P><P>Blink rate of the text insertion cursor in milliseconds. Set to zero to stopblinking.</P><P><PRE><B>nedit*text.Translations</B>:</PRE></P><P>Modifies key bindings (see below).</P><P><PRE><B>nedit*foreground</B>: black</PRE></P><P>Default foreground color for menus, dialogs, scroll bars, etc..</P><P><PRE><B>nedit*background</B>: #b3b3b3</PRE></P><P>Default background color for menus, dialogs, scroll bars, etc..</P><P><PRE><B>nedit*calltipForeground</B>: black</PRE></P><P>Foreground color for calltips</P><P><PRE><B>nedit*calltipBackground</B>: LemonChiffon1</PRE></P><P>Background color for calltips</P><P><PRE><B>nedit*fontList</B>: helvetica medium 12 points</PRE></P><P>Default font for menus, dialogs, scroll bars, etc..</P><P><PRE><B>nedit.helpFont</B>: helvetica medium 12 points</PRE></P><P>Font used for displaying online help.</P><P><PRE><B>nedit.boldHelpFont</B>: helvetica bold 12 points</PRE></P><P>Bold font for online help.</P><P><PRE><B>nedit.italicHelpFont</B>: helvetica italic 12 points</PRE></P><P>Italic font for online help.</P><P><PRE><B>nedit.fixedHelpFont</B>: courier medium 12 points</PRE></P><P>Fixed font for online help.</P><P><PRE><B>nedit.boldFixedHelpFont</B>: courier bold 12 points</PRE></P><P>Fixed bold for online help.</P><P><PRE><B>nedit.italicFixedHelpFont</B>: courier italic 12 points</PRE></P><P>Fixed italic font for online help.</P><P><PRE><B>nedit.h1HelpFont</B>: helvetica bold 14 points</PRE></P><P>Font for level-1 titles in help text.</P><P><PRE><B>nedit.h2HelpFont</B>: helvetica bold italic 12 points</PRE></P><P>Font for level-2 titles in help text.</P><P><PRE><B>nedit.h3HelpFont</B>: courier bold 12 points</PRE></P><P>Font for level-3 titles in help text.</P><P><PRE><B>nedit.helpLinkFont</B>: helvetica medium 12 points</PRE></P><P>Font for hyperlinks in the help text</P><P><PRE><B>nedit.helpLinkColor</B>: #009900</PRE></P><P>Color for hyperlinks in the help text</P><P><PRE><B>nedit.backlightCharTypes</B>: 0-8,10-31,127:red;9:#dedede;32-126,160-255:#f0f0f0;128-159:orange</PRE></P><P><B>NOTE: backlighting is <I>experimental</I></B> (see "<A HREF="programmer.html#Programming_with_NEdit">Programming with NEdit</A>").</P><P>A string specifying character classes as ranges of ASCII values followed bythe color to be used as their background colors. The format is:</P><P>low[-high]{,low[-high]}:color{;low-high{,low[-high]}:color}</P><P>where low and high are ASCII values.</P><P>For example:<PRE> 32-255:#f0f0f0;1-31,127:red;128-159:orange;9-13:#e5e5e5</PRE></P><P><PRE><B>nc.autoStart</B>: True </PRE></P><P>Whether the nc program should automatically start an NEdit server (withoutprompting the user) if an appropriate server is not found.</P><P><PRE><B>nc.serverCommand</B>: nedit -server</PRE></P><P>Command used by the nc program to start an NEdit server.</P><P><PRE><B>nc.timeOut</B>: 10</PRE></P><P>Basic time-out period used in communication with an NEdit server (seconds).</P><P><P><HR><I>The following are Selected widget names (to which you may append</I><I>.background, .foreground, .fontList, etc., to change colors, fonts</I><I> and other characteristics):</I></P><P><PRE><B>nedit*statsAreaForm</B></PRE></P><P>Statistics line and incremental search bar. To get consistent results acrossthe entire stats line and the incremental search bar, use '*' rather than '.'to separate the resource name. For example, to set the foreground color ofboth components use: <PRE> nedit*statsAreaForm*foreground</PRE>instead of:<PRE> nedit*statsAreaForm.foreground</PRE></P><P><PRE><B>nedit*menuBar</B></PRE></P><P>Top-of-window menu-bar.</P><P><PRE><B>nedit*textHorScrollBar</B></PRE></P><P>Horizontal scroll bar.</P><P><PRE><B>nedit*textVertScrollBar</B></PRE></P><P>Vertical scroll bar.<P><HR></P><P></P></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -