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

📄 faq.txt

📁 nedit 是一款linux下的开发源码的功能强大的编辑器
💻 TXT
📖 第 1 页 / 共 4 页
字号:
> I can't get the delete key to remap to a forward delete. I have re-bound it> in my .Xdefaults file, and that doesn't help.In your .Xdefaults file, add:    nedit.remapDeleteKey: FalseThis is now the default, so you likely have an old resource file sittingaround somewhere with this setting. When remapDeleteKey is True), NEditforcibly maps the delete to backspace. This can be used when the X serverand the client machine have different expectations about whether the key inthe backspace position on the keyboard is a backspace key or a delete key.It also saves users in very heterogeneous environments from having tore-map keys on nearly every system they use just to be able to backspace.> My X resource settings don't work.It's harder to explain how to specify X resources than you might expect,since how they are set is often configured by your local system manager.They are either automatically attached to the server (your screen) by an Xstartup or login script, or they are left unspecified, and read from the.Xdefaults file whenever you run an X application. If they are attached tothe server, you should find out the "normal" method for setting them onyour system. If it's not the .Xdefaults file, then it is usually a filecalled .Xresources (also in your home directory). To make a change, youhave to either run xrdb, or re-invoke the startup script that originallyattached them, usually by exiting and re-starting X, or logging out andback in to your X session.Since setting resources is tricky, it's usually better to start withsomething simple, like:    nedit*foreground:greenThen, once you have that working, try the more subtle or difficult ones.You can also use the appres command to find out what resources neditactually sees ('appres NEdit nedit').> I am setting some X defaults in my $HOME/.nedit file but some of them don't> work.The .nedit file holds the NEdit Preferences menu options and isautomatically overwritten whenever you select "Save Defaults". You reallyshouldn't put X resource settings there. Also, as you may have discovered,resources other than Preferences resources don't always work from there.How you set X resources depends on local system conventions. You usuallyput them in the .Xdefaults or .Xresources file in your home directory. Youmay also need to run xrdb to install them in the server. It depends on howyour local system has been configured, so it's best to talk to the personwho configured your system. If you're not sure whether your resources areset up correctly, the command:    appres NEdit neditwill tell you what settings NEdit will see when it runs.> If I install an "app-defaults" file for NEdit (empty too), all default> shortcuts are reset (only "Alt+B" and "Alt+Z" works). Without that file all> works fine. Now, how can I customize nedit with this problem ? Or, how can> I get a copy of all default shortcuts to add on my NEdit "app-defaults"> file ?NEdit uses the X fallback resources mechanism to provide default values foruser-settable resources. When you provide a system-wide app- defaults file,it overrides the entire contents of the fallback resources, meaning all ofthe program defaults are lost, except for those which are also representedin the app-defaults file. To use an app-defaults file, therefore, you needto start from a complete one which provides all of the necessary defaultvalues. There is a complete app-defaults file in:    ftp://ftp.nedit.org/pub/contrib/misc/nedit.app-defaultsWe strongly discourage users from using system-wide app-defaults becauseonce you install the file, you have to keep it up to date with every newrelease of the software. If you don't update it, users might not evennotice the difference, but things will be increasingly wrong with each newrelease.> Where can I get the complete list of nedit resources?The way X is designed, there are a LOT of user settable resources in NEdit,most of them quite useless. You can see them all using the editres tool,which is available on most Unix systems. A more useful subset are theapplication default resources, which you can look at either in the sourcecode (near the beginning of nedit.c, in the variable calledfallbackResources) or in the app-defaults file in:    ftp://ftp.nedit.org/pub/contrib/misc/nedit.app-defaults> Can I use 'ispell' with NEdit instead of the less capable Unix 'spell'> command?'ispell' is actually the default spell checker for NEdit on Linux systemswhere 'spell' is not available. On other systems, enter the following inthe Shell Commands dialog:  Command Input: Either  Command Output: Same Window  Output Replaces Input: ON  Shell Command: cat>spellTmp; xterm -e ispell -x spellTmp; cat spellTmp; rm spellTmpIf you want to get fancy, the following puts the temporary file in the /tmpdirectory, and uses $$ (the process ID of the shell) in the file name soyou don't have to worry about clashes between simultaneous ispell sessions:  cat > /tmp/ispell.$$; xterm -title "Spell Check" -e  ispell -S /tmp/ispell.$$; cat /tmp/ispell.$$; rm /tmp/ispell.$$> How can the display of hidden (eg .login) files in dialog boxes be> suppressed? We use nedit with for teaching programming with very naive and> inexperienced students. The display of these in dialogs such as the "Save> as..." one encourages them to screw up important login stuff, state files> etc.It depends on the system you are running how easy this is to do. UnderMotif 2.0, which I think is still only found on Linux and Free-BSD systems,it's a simple resource setting:    nedit*XmFileSelectionBox.fileFilterStyle: FILTER_HIDDEN_FILESOn other systems, unfortunately, it's a rather difficult source codechange, involving creating a replacement file searching procedure to bespliced in to the file selection box widget.> Most Motif applications allow you to type in the file name in a separate> text field (as in the 'open file' dialog). Why doesn't NEdit? Can I make it> do that?Set the X resource nedit.stdOpenDialog to True. The field is disabled bydefault to get new users accustomed to typing the file name directly in tothe list widget, which is not standard Motif behavior.> I would like to change NEdit's cursor from a bar to a block. I seem to lose> it sometimes in my text.The block cursor in NEdit is used to indicate overstrike mode, but you canturn on a resource to make the cursor thicker:    nedit*text.heavyCursor: trueThe only way to get a permanent block cursor, though is to hack the sourcecode. This shouldn't be too difficult, since the code for drawing a blockcursor is already there.> I'd like to see more than 8 files in the file selection dialogs (Open, Save> As, Include, etc.). I've tried to set the X-resources like> nedit*XmList.visibleItemCount: 20, but this did not work.The only effective way I've found to control the number of items in thehighly temperamental Motif FileSelectionBox widget is through the heightresource:    nedit*FileSelect.height: 900The X resource line above will make the file selection box 900 pixels tall.> I am trying to do key bindings such that, for example, Find is Alt+F rather> than Ctrl+F. However, this clashes with the find menu mnemonic. I realize> that the menu mnemonics can be changed to any letter, but they are always> bound to Alt-letter. I would like to just remove all menu mneumonics. Is> there any way to do this in an .Xdefaults file?You can turn mnemonics off by setting them to the ascii null character, forexample:    nedit*fileMenu.mnemonic: \0> I have a PC-style 2-button mouse. Can I switch the 2nd and 3rd mouse> buttons so the more important functions like secondary selection are on the> right button instead of the middle (which is emulated by pressing 1+3> buttons simultaneously under Linux), like they were in version 4?It's somewhat involved and hard to figure out from the documentation, butyes you can. You have to reverse the translation table bindings for mousebuttons 2 and 3, AND reset the bgMenuButton resource. The translation tablebindings can either be found in the source file source/text.c, or by addingand activating a temporary translation to the text widget for dumping thetranslation table itself (XtDisplayTranslations()).What it boils down to, though, is just add the following lines to your Xresource file (.Xdefaults or .Xresources depending on your system):  NEdit*text.Translations: #override \n\     <Btn3Down>: secondary_or_drag_start()\n\     Shift Ctrl Button3<MotionNotify>: \         secondary_or_drag_adjust("rect", "copy", "overlay")\n\     Shift Button3<MotionNotify>: secondary_or_drag_adjust("copy")\n\     Ctrl Button3<MotionNotify>: secondary_or_drag_adjust("rect", "overlay")\n\     Button3<MotionNotify>: secondary_or_drag_adjust()\n\     Shift Ctrl<Btn3Up>: move_to_or_end_drag("copy", "overlay")\n\     Shift <Btn3Up>: move_to_or_end_drag("copy")\n\     Alt<Btn3Up>: exchange()\n\     Meta<Btn3Up>: exchange()\n\     Ctrl<Btn3Up>: copy_to_or_end_drag("overlay")\n\     <Btn3Up>: copy_to_or_end_drag()\n\     Ctrl~Meta~Alt<Btn2Down>: mouse_pan()\n\     Ctrl~Meta~Alt Button2<MotionNotify>: mouse_pan()\n\     <Btn2Up>: end_drag()  nedit.bgMenuButton: ~Shift~Ctrl~Meta~Alt<Btn2Down>> I'd like to send mail directly from my nedit window, but there's no good> way to make a shell command prompt me for input (for entering the recipient> and subject).Use a macro command instead to do the prompting:  to = string_dialog("Send mail to: (enter name below, along with any\n" \      "additional Unix Mail command parameters, -s for subject)", \      "Send", "Cancel")  if ($string_dialog_button == 2 || $string_dialog_button == 0)      return  if ($selection_start == -1)      body = get_range(0, $text_length)  else      body = get_selection()  cmdOutput = shell_command("Mail " to, body)  if ($shell_cmd_status != 0)      dialog("mail command returned failed exit status\n" cmdOutput)  else if (cmdOutput != "")      dialog(cmdOutput)> How I can set the foreground color for selected text to be always say grey1> even when syntax highlighting is applied?There's no equivalent to the nedit*text.selectForeground resource when youturn on syntax highlighting. You just have to choose a selection color thatis compatible with all of your highlighting colors.FEATURES--------> 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 hadto be duplicated in the new widget. Drag and drop between windows got leftoff due to time pressure of getting out the new release, but it will beback some day.> Why don't you integrate Max Vohlken's / Yunliang Yu's versions into the> official release of NEditMany 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. Iappreciate 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 ofthem break the VMS version, some interfere with existing commands that areimportant to other users, and some are just customizations that I don'tparticularly agree with. Mostly, I want to do a lot of testing to make surethe changes are safe on all platforms, and I just don't have time rightnow. (Mark Edel)Update as of NEdit version 5.2RC1: The forthcoming NEdit version 5.2contains several functionalities of Max's patches.> I really like nedit and it would be nice to use on windows 95 or NT instead> of word or notepad. Is this possible?There is an NT version of NEdit, available athttp://nedit.org/download/win32.shtml. A mini-FAQ is also available.> 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 onthe whole display. This means that some of the tricks used in PC andMacintosh programs don't work in X. On PCs and Macs, programs can fill indefault values in text fields, and select the text that they have insertedsuch that If the user types over the selection, it will automatically beerased. Under X, there is a price to pay for making an automatic selection.The selection must be "stolen" from some other window, maybe some otherprogram. If the user's intent was to paste a selection that existed beforethe dialog popped up, once the automatic selection is made, they are out ofluck.If NEdit automatically transferred the selection to the Find or Replacedialog, it would either have to steal the selection, or users would have toclick or drag the mouse over the text to delete it before they could typeanything different. Instead, NEdit has a "Find Selection" command, as wellas 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

⌨️ 快捷键说明

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