help_data.h

来自「nedit 是一款linux下的开发源码的功能强大的编辑器」· C头文件 代码 · 共 1,238 行 · 第 1/5 页

H
1,238
字号
"as to exclude text to the left of the selection such as comment bars or other ","text columns. ",NULL};static char * htxt_format [] = {"\01IWhile plain-text is probably the simplest and most interchangeable file ","format in the computer world, there is still variation in what plain-text ","means from system to system.  Plain-text files can differ in character set, ","line termination, and wrapping. ","\n\n","While character set differences are the most obvious and pose the most ","challenge to portability, they affect NEdit only indirectly via the same font ","and localization mechanisms common to all X applications.  If your system is ","set up properly, you will probably never see character-set related problems ","in NEdit.  NEdit can not display Unicode text files, or any multi-byte ","character set. ","\n\n","The primary difference between an MS DOS format file and a Unix format file, ","is how the lines are terminated.  Unix uses a single newline character.  MS ","DOS uses a carriage-return and a newline.  NEdit can read and write both file ","formats, but internally, it uses the single character Unix standard.  NEdit ","auto-detects MS DOS format files based on the line termination at the start ","of the file.  Files are judged to be DOS format if all of the first five line ","terminators, within a maximum range, are DOS-style.  To change the format in ","which NEdit writes a file from DOS to Unix or visa versa, use the Save As... ","command and check or un-check the MS DOS Format button. ","\n\n","Wrapping within text files can vary among individual users, as well as from ","system to system.  Both Windows and MacOS make frequent use of plain text ","files with no implicit right margin.  In these files, wrapping is determined ","by the tool which displays them.  Files of this style also exist on Unix ","systems, despite the fact that they are not supported by all Unix utilities. ","To display this kind of file properly in NEdit, you have to select the wrap ","style called Continuous.  Wrapping modes are discussed in the sections: ","Customizing -> Preferences, and Basic Operation -> Shifting and Filling. ","\n\n","The last and most minute of format differences is the terminating newline. ","Some Unix compilers and utilities require a final terminating newline on all ","files they read and fail in various ways on files which do not have it.  Vi ","and approximately half of Unix editors enforce the terminating newline on all ","files that they write; Emacs does not enforce this rule.  Users are divided ","on which is best.  NEdit makes the final terminating newline optional ","(Preferences -> Default Settings -> Terminate with Line Break on Save). ",NULL};static char * htxt_programmer [] = {"\01IThough general in appearance, NEdit has many features intended specifically ","for programmers.  Major programming-related topics are listed in separate ","sections under the heading: \"Features for Programming\": \01QSyntax Highlighting\01I, ","\01QTabs/Emulated Tabs\01I, \01QFinding Declarations (ctags)\01I, \01QCalltips\01I, and ","\01QAuto/Smart Indent\01I.  Minor topics related to programming are discussed below: ","\n\n","\01RLanguage Modes\01I","\n\n","When NEdit initially reads a file, it attempts to determine whether the file ","is in one of the computer languages that it knows about.  Knowing what language ","a file is written in allows NEdit to assign highlight patterns and smart indent ","macros, and to set language specific preferences like word delimiters, tab ","emulation, and auto-indent.  Language mode can be recognized from both the file ","name and from the first 200 characters of content.  Language mode recognition ","and language-specific preferences are configured in: Preferences -> Default ","Settings -> Language Modes.... ","\n\n","You can set the language mode manually for a window, by selecting it from the ","menu: Preferences -> Language Modes. ","\n\n","\01RBacklighting [EXPERIMENTAL]\01I","\n\n","NEdit can be made to set the background color of particular classes of ","characters to allow easy identification of those characters. This is ","particularly useful if you need to be able to distiguish between tabs ","and spaces in a file where the difference is important. The colors used ","for backlighting are specified by a resource, \"nedit*backlightCharTypes\". ","You can turn backlighting on and off through the ","Preferences -> Apply Backlighting menu entry. ","\n\n","If you prefer to have backlighting turned on for all new windows, use ","the Preferences -> Default Settings -> Apply Backlighting menu entry. ","This settings can be saved along with other preferences using ","Preferences -> Save Defaults. ","\n\n","\01JImportant:\01I In future versions of NEdit, the backlighting feature will be ","extended and reworked such that it becomes easier to configure. The current ","way of controlling it through a resource is generally considered to be below ","NEdit's usability standards. These future changes are likely to be ","incompatible with the current format of the \"nedit*backlightCharTypes\" ","resource, though. Therefore, it is expected that there will be no automatic ","migration path for users who customize the resource. ","\n\n","\01RLine Numbers\01I","\n\n","To find a particular line in a source file by line number, choose Goto Line ","#... from the Search menu.  You can also directly select the line number text ","in the compiler message in the terminal emulator window (xterm, decterm, ","winterm, etc.) where you ran the compiler, and choose Goto Selected from the ","Search menu. ","\n\n","To find out the line number of a particular line in your file, turn on ","Statistics Line in the Preferences menu and position the insertion point ","anywhere on the line.  The statistics line continuously updates the line number ","of the line containing the cursor. ","\n\n","To go to a specific column on a given line, choose Goto Line #... from the ","Search menu and enter a line number and a column number separated by a ","comma.  (e.g. Enter \"100,12\" for line 100 column 12.)  If you want to go to ","a column on the current line just leave out the line number.  (e.g. Enter ","\",45\" to go the column 45 on the current line.) ","\n\n","\01RMatching Parentheses\01I","\n\n","To help you inspect nested parentheses, brackets, braces, quotes, and other ","characters, NEdit has both an automatic parenthesis matching mode, and a Goto ","Matching command.  Automatic parenthesis matching is activated when you type, ","or move the insertion cursor after a parenthesis, bracket, or brace.  It ","momentarily highlights either the opposite character ('Delimiter') or the ","entire expression ('Range') when the opposite character is visible in the ","window. To find a matching character anywhere in the file, select it or ","position the cursor after it, and choose Goto Matching from the Search menu. ","If the character matches itself, such as a quote or slash, select the first ","character of the pair.  NEdit will match {, (, [, <, \", ', `, /, and \\. ","Holding the Shift key while typing the accelerator key (Shift+Ctrl+M, by ","default), will select all of the text between the matching characters. ","\n\n","When syntax highlighting is enabled, the matching routines can optionally ","make use of the syntax information for improved accuracy. In that case, ","a brace inside a highlighted string will not match a brace inside a comment, ","for instance. ","\n\n","\01ROpening Included Files\01I","\n\n","The Open Selected command in the File menu understands the C preprocessor's ","#include syntax, so selecting an #include line and invoking Open Selected will ","generally find the file referred to, unless doing so depends on the settings of ","compiler switches or other information not available to NEdit. ","\n\n","\01RInterface to Programming Tools\01I","\n\n","Integrated software development environments such as SGI's CaseVision and ","Centerline Software's Code Center, can be interfaced directly with NEdit via ","the client server interface.  These tools allow you to click directly on ","compiler and runtime error messages and request NEdit to open files, and select ","lines of interest.  The easiest method is usually to use the tool's interface ","for character-based editors like vi, to invoke nc, but programmatic interfaces ","can also be derived using the source code for nc. ","\n\n","There are also some simple compile/review, grep, ctree, and ctags browsers ","available in the NEdit contrib directory on ftp.nedit.org. ",NULL};static char * htxt_tabs [] = {"\01RChanging the Tab Distance\01I","\n\n","Tabs are important for programming in languages which use indentation to show ","nesting, as short-hand for producing white-space for leading indents.  As a ","programmer, you have to decide how to use indentation, and how or whether tab ","characters map to your indentation scheme. ","\n\n","Ideally, tab characters map directly to the amount of indent that you use to ","distinguish nesting levels in your code.  Unfortunately, the Unix standard ","for interpretation of tab characters is eight characters (probably dating ","back to mechanical capabilities of the original teletype), which is usually ","too coarse for a single indent. ","\n\n","Most text editors, NEdit included, allow you to change the interpretation of ","the tab character, and many programmers take advantage of this, and set their ","tabs to 3 or 4 characters to match their programming style.  In NEdit you set ","the hardware tab distance in Preferences -> Tabs... for the current window, ","or Preferences -> Default Settings -> Tabs... (general), or Preferences -> ","Default Settings -> Language Modes... (language-specific) to change the ","defaults for future windows. ","\n\n","Changing the meaning of the tab character makes programming much easier while ","you're in the editor, but can cause you headaches outside of the editor, ","because there is no way to pass along the tab setting as part of a plain-text ","file.  All of the other tools which display, print, and otherwise process ","your source code have to be made aware of how the tabs are set, and must be ","able to handle the change.  Non-standard tabs can also confuse other ","programmers, or make editing your code difficult for them if their text ","editors don't support changes in tab distance. ","\n\n","\01REmulated Tabs\01I","\n\n","An alternative to changing the interpretation of the tab character is tab ","emulation.  In the Tabs... dialog(s), turning on Emulated Tabs causes the Tab ","key to insert the correct number of spaces and/or tabs to bring the cursor ","the next emulated tab stop, as if tabs were set at the emulated tab distance ","rather than the hardware tab distance. Backspacing immediately after entering ","an emulated tab will delete the fictitious tab as a unit, but as soon as you ","move the cursor away from the spot, NEdit will forget that the collection of ","spaces and tabs is a tab, and will treat it as separate characters.  To enter ","a real tab character with \"Emulate Tabs\" turned on, use Ctrl+Tab. ","\n\n","It is also possible to tell NEdit not to insert ANY tab characters at all in ","the course of processing emulated tabs, and in shifting and rectangular ","insertion/deletion operations, for programmers who worry about the ","misinterpretation of tab characters on other systems. ",NULL};static char * htxt_indent [] = {"\01IProgrammers who use structured languages usually require some form of ","automatic indent, so that they don't have to continually re-type the ","sequences of tabs and/or spaces needed to maintain lengthy running indents. ","NEdit therefore offers \"smart\" indent, in addition to the traditional ","automatic indent which simply lines up the cursor position with the previous ","line. ","\n\n","\01RSmart Indent\01I","\n\n","Smart indent macros are only available by default for C and C++, and while ","these can easily be configured for different default indentation distances, ","they may not conform to everyone's exact C programming style.  Smart indent ","is programmed in terms of macros in the NEdit macro language which can be ","entered in: Preferences -> Default Settings -> Indent -> Program Smart ","Indent.  Hooks are provided for intervening at the point that a newline is ","entered, either via the user pressing the Enter key, or through ","auto-wrapping; and for arbitrary type-in to act on specific characters typed. ","\n\n","To type a newline character without invoking smart-indent when operating in ","smart-indent mode, hold the Shift key while pressing the Return or Enter key. ","\n\n","\01RAuto-Indent\01I","\n\n","With Indent set to Auto (the default), NEdit keeps a running indent.  When ","you press the Return or Enter key, spaces and tabs are inserted to line up ","the insert point under the start of the previous line. ","\n\n","Regardless of indent-mode, Ctrl+Return always does the automatic indent; ","Shift+Return always does a return without indent. ","\n\n","\01RBlock Indentation Adjustment\01I","\n\n","The Shift Left and Shift Right commands as well as rectangular dragging can ","be used to adjust the indentation for several lines at once.  To shift a ","block of text one character to the right, select the text, then choose Shift ","Right from the Edit menu.  Note that the accelerator keys for these menu ","items are Ctrl+9 and Ctrl+0, which correspond to  the right and left ","parenthesis on most keyboards.  Remember them as adjusting the text in the ","direction pointed to by the parenthesis character.  Holding the Shift key ","while selecting either Shift Left or Shift Right will shift the text by one ","tab stop (or by one emulated tab stop if tab emulation is turned on).  The ","help section \"Shifting and Filling\" under \"Basic Operation\" has details. ",NULL};

⌨️ 快捷键说明

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