From 63a69a7bbb6cba8ea6884e1c6fa73dcaa81fbafa Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 24 Jan 2014 22:49:11 +0900 Subject: Kate handbook review - chapter 4 --- doc/kate/configuring.docbook | 6 +- doc/kate/part.docbook | 335 ++++++++++++++++++++++++------------------- 2 files changed, 187 insertions(+), 154 deletions(-) (limited to 'doc/kate') diff --git a/doc/kate/configuring.docbook b/doc/kate/configuring.docbook index a6b36469e..46a3e4703 100644 --- a/doc/kate/configuring.docbook +++ b/doc/kate/configuring.docbook @@ -753,7 +753,7 @@ when possible. - + Selection Mode @@ -823,7 +823,7 @@ will automatically start a new line of text when the current line reaches the length specified by the Wrap Words At: option. - + Enable static word wrap Turns static word wrap on or off. @@ -841,7 +841,7 @@ font. -Wrap words at: +Wrap words at If the Word Wrap option is selected this entry determines the length (in characters) at which the editor will diff --git a/doc/kate/part.docbook b/doc/kate/part.docbook index f07f44cee..e99985539 100644 --- a/doc/kate/part.docbook +++ b/doc/kate/part.docbook @@ -2,8 +2,10 @@ &Anders.Lund; &Anders.Lund.mail; +&tde-authors; + Working with the &kate; editor @@ -45,7 +47,7 @@ displaying a small icon next to marked lines. linkend="kate-part-bookmarks">bookmark in a visible line by clicking the &LMB; in the icon border next to that line. The display of the icon border can be toggled using the -View Show Icon +View Show/Hide Icon Border menu item. @@ -53,10 +55,10 @@ Border menu item. The Line Numbers Pane -The Line numbers pane shows the line numbers of all visible +The Line Numbers Pane shows the line number of all visible lines in the document. The display of the Line Numbers Pane can be toggled using the -View Show Line +View Show/Hide Line Numbers menu item. @@ -94,8 +96,8 @@ Wrapping Text Navigating in the Text -Moving around in the text in &kate; is like in most graphical text -editors. You move the cursor using the arrow keys and the +Moving around the text in &kate; is like in most graphical text +editors. You move the cursor using the arrow keys and the Page Up, Page Down, Home and End keys in combination with the Ctrl and Shift modifiers. The Shift key is always used @@ -116,9 +118,9 @@ end of the line. &kate; also provides you with a way to quickly jump to a matching brace -or paranthese: Place the cursor on the inside of a parenthese or brace +or paranthesis. Place the cursor on the inside of a parenthesis or brace character, and press Ctrl6 -to jump to the matching parenthese or brace. +to jump to the matching parenthesis or brace. In addition you can use bookmarks to quickly jump to @@ -130,10 +132,10 @@ positions that you define on your own. Working with the Selection There are two basic ways of selecting text in &kate;: using the -mouse, and using the keyboard. +mouse and using the keyboard. -To select using the mouse, hold down the &LMB; while dragging -the mouse cursor from where the selection should start, to the desired +To select text using the mouse, hold down the &LMB; while dragging +the mouse cursor from the point where the selection should start to the desired end point. The text gets selected as you drag. Double-clicking a word will select that word. @@ -141,40 +143,40 @@ end point. The text gets selected as you drag. Triple-clicking in a line will select the entire line. If &Shift; is held down while clicking, text will be -selected: +selected as follow: If nothing is already selected, from the text cursor position to the mouse cursor position. -If there is a selection, from and including that -selection to the mouse cursor position +If there is already a selection, from the selection start point +to the mouse cursor position. When selecting text by dragging the mouse, the -selected text is copied to the clipboard, and can be pasted by +selected text is copied to the clipboard and can be pasted by clicking the middle mouse button in the editor, or in any other application to which you want to paste the text. -To select using the keyboard, hold down the &Shift; key while -using the navigation keys (The Arrow keys, Page Up, +To select text using the keyboard, hold down the &Shift; key while +using the navigation keys (the arrow keys, Page Up, Page Down, Home and End, possibly in combination with &Ctrl; to extend the move of the text cursor). See also the section Navigating in the Text in this -Chapter. +chapter. -To Copy the current selection, use the +To copy the current selection, use the Edit Copy menu item or the keyboard shortcut (defaults to &Ctrl;C). -To Deselect the current selection, use the +To deselect the current selection, use the Edit Deselect menu item, or the keyboard shortcut (default is Using Block Selection -When Block Selection is enabled, you can make vertical +When the Block Selection Mode is enabled, you can make vertical selections in the text, meaning selecting limited columns from multiple lines. This is handy for working with tab separated lines for example. -Block Selection can be toggled using the -Edit Toggle Block -Selection menu item. The default keyboard -shortcut is F4 +Block Selection Mode can be toggled using the +Edit +Block Selection Mode menu item. The default keyboard +shortcut is &Ctrl;&Shift;B. -Using Overwrite Selection +Using Normal Selection Mode -If Overwrite Selection is enabled, typing or pasting text into +If Normal Selection Mode is enabled, typing or pasting text into the selection will cause the selected text to be replaced. If not enabled, new text will be added at the position of the text cursor. -Overwrite Selection is enabled by default. +Normal Selection Mode is enabled by default. To change the setting for this option, use the Select Page of the Configuration Dialog. +linkend="config-dialog-editor-selection-mode">Cursor & Selection page of the configuration dialog. -Using Persistent Selection +Using Persistent Selection Mode -When Persistent selection is enabled, typing characters or -moving the cursor will not cause the Selection to become +When Persistent Selection Mode is enabled, typing characters or +moving the cursor will not cause the selection to become deselected. This means that you can move the cursor away from the selection and type text. -Persistent Selection is disabled by default. +Persistent Selection Mode is disabled by default. -Persistent Selection can be enabled in the Select Page of the Configuration Dialog. - - -If Persistent Selection and Overwrite Selection are both -enabled, typing or pasting text when the text cursor is inside the -selection will cause it to be replaced and deselected. - +Persistent Selection Mode can be enabled in the Cursor & Selection page of the configuration dialog. @@ -246,7 +242,7 @@ selection will cause it to be replaced and deselected. Edit Copy menu item. Additionally, selecting text with the mouse will cause selected text to be copied to -the X selection. +the clipboard. To paste the text currently in the clipboard, use the @@ -258,9 +254,8 @@ clicking the middle mouse button at the desired position. -If you are using the &tde; desktop, you can retrieve earlier -copied text from any application using the &klipper; icon in the -&kicker; icon tray. +You can also retrieve earlier copied text from any application using +the &klipper; icon in the &kicker; icon tray. @@ -288,7 +283,7 @@ depends on some of the options described below. -Regular Expression +Regular expression If checked, the search string is interpreted as a regular expression. A button for using a graphical tool to create or edit the @@ -299,18 +294,18 @@ Expressions for more on these. -Case Insensitive +Case sensitive -If enabled, the search will be case insensitive. +If enabled, the search will be case sensitive. -Whole Words Only +Whole words only If checked, the search will only match if there is a word -boundary at both ends of the string matching, meaning not an -alphanumeric character - either some other visible character or a line +boundary at both ends of the string matching, meaning neither an +alphanumeric character, nor some other visible characters, nor a line end. @@ -318,71 +313,87 @@ end. From cursor -If checked, the search will start at cursor position, otherwise it will -start at the beginning of the first line in the document. +If checked, the search will start at the current cursor position, +otherwise it will start at the beginning of the document. -Find Backwards +Find backwards If checked, the search will look for the first match above the -starting point, either cursor position or the beginning of the -document, if the From Beginning option is -enabled. +starting point, either the cursor position or the beginning of the +document depending on the status of the From cursor option. + + + + +Selected text + +This option is not available if no text is selected. +If some text has been selected and the option is checked, the +search string will be matched only against the selected text. -The Replace Text Dialog offers some +The Replace Text dialog offers some additional options: Replace With -This is where to enter the replacement -string. + +This is where to enter the replacement string. + - -Selected Text + +Use placeholders -This option is disabled if no text is selected, or if the -Prompt on Replace -option is enabled. If checked, all matches of the search string within -the selected text will be replaced with the replace string. +If enabled, any occurrence of \N where +N is an integer number, will be replaced +with the corresponding string capture (parenthesized substring) +from the search pattern. A button for listing all available string captures +will also be enabled. You can click on any of the available string captures +to include them in your replacement string. -Prompt on Replace +Prompt on replace If checked, a small dialog will prompt you for what to do for each time a match is found. It offers the following options: -Yes -Activate this to replace the current match (which is -selected in the editor). +Replace +Use this button to replace the current match, which is +selected in the editor. After the replacement, search for the next match +automatically. + + + +Replace & Close +Use this button to replace the current match, which is +selected in the editor. After the replacement, close the dialog. -No -Activate to skip the current match, and try to find another one. +Replace All +Use this button to replace all matches without further prompt. -All -Activate to cancel prompting, and just replace all -matches. +Find next +Use this button to skip replacing the current match and try to find the next one. Close -Activate this to skip the current match and end the -searching. +Use this button to skip replacing the current match and close the dialog. @@ -392,31 +403,21 @@ searching. - -There is currently no way to use minimal matching when searching -for a regular expression. This will be added in a future version of -&kate; - - Finding Text -To find text, launch the Find Text Dialog -with &Ctrl;For +To find text, launch the Find Text dialog +with &Ctrl;F or from the Edit Find... menu item, enter a -search string, set the options as desired and hit -Ok. If the search was started at cursor position and no -match was found before reaching the end (or beginning if you are searching -backward) of the document, you will be asked if you want to wrap the search. - +search string, set the options as desired and hit the +Find button. If a match is found it is selected and the Find -Text Dialog is hidden, but stay tuned, finding further -matches is very easy: +Text dialog is hidden. Finding further +matches is very easy. To find the next match in the search direction, use the Edit Find @@ -429,32 +430,31 @@ Previous command or press &Shift;F3. If no match is found before reaching the document end (or beginning if you -are searching backward) , you will be asked if you want to wrap the search. - +are searching backward), you will be asked if you want to continue the search +from the other end of the document. Replacing Text -To replace text, launch the Replace text -Dialog using the Edit -Replace command, or the +To replace text, launch the Replace Text +dialog using the Edit +Replace... command or the &Ctrl;R shortcut, -enter a search string and optionally a replace string (if the replace -string is empty, each match will be removed), set +enter a search string and optionally a replace string, set the options as desired and -hit the Ok button. +hit the Replace button. If the replace +string is empty, each match will be removed. If you are using a regular expression to find the text to replace, you can -employ backreferences to reuse text captured in parenthesized subpatterns of the expression. -See for more -on those. +employ placeholders to reuse text +captured in parenthesized subpatterns of the expression. You can do find, replace and -ifind (incremental search) from the +ifind (incremental search) from the editor command line. @@ -473,12 +473,12 @@ able to easily find them again. Move the insertion cursor to the line and activate the -BookmarksToggle +BookmarksSet Bookmark (&Ctrl;B) command. -Click in the Icon Border next to the line. +Click on the Icon Border Pane next to the line. @@ -492,51 +492,85 @@ bookmark. To quickly move between bookmarks or to the next/previous bookmark, use the BookmarksNext - (Ctrl + (Alt Page Down) or BookmarksPrevious -(CtrlPage Up +(AltPage Up ) commands. +To remove a single bookmark, move the insertion cursor to the line +of that bookmark and activate the Bookmarks +Clear Bookmark (&Ctrl;B) command. + +To remove all bookmarks at once, use the Bookmarks +Clear All Bookmarks menu entry. + -Automatically Wrapping text +Wrapping text + +There are two types of text wrapping: + + +Static word wrapping + + + +Dynamic word wrapping + + + + + +Static word wrapping This feature allows you to have the text formatted in a very simple way: the text will be wrapped, so that no lines exceed a maximum number of characters per line, unless there is a longer string of non-whitespace characters. -To enable/disable it, check/uncheck the Word Wrap checkbox in the -edit page of the configuration dialog. +To enable/disable it, check/uncheck the +Enable static word wrap checkbox in the +Editing page of the configuration dialog. -To set the maximum line width (maximum characters per line), use the -Wrap Words At -option in the edit page of the configuration -dialog. +To set the maximum line length (maximum characters per line), use the +Wrap words at option in the +Editing page of the +configuration dialog. -If enabled, -it has the following effects: +If enabled, static word wrapping has the following effects: While typing, the editor will automatically insert a hard line break after the last whitespace character at a position before the maximum line width is reached. -While loading a document, the editor will wrap the text in a similar way, so that -no lines are longer than the maximum line width, if they contain any whitespace allowing that. +While loading a document, the editor will wrap the text in a similar way so that +no lines will be longer than the maximum line length, if they contain any whitespace allowing that. -There is currently no way to set word wrap for document types, or even to enable or disable -the feature on document level. This will be fixed in a future version of &kate; + + + +Dynamic word wrapping + +This feature allows the text lines to be wrapped at the view border of the screen. +The wrapping only affects the view, no hard line break character is inserted in the text. + +To enable/disable it, check/uncheck the +Dynamic word wrap checkbox in the +Appearance page of the +configuration dialog. + -Using automatic indenting +Using automatic indentation -&kate;s editor component supports a variation of autoindenting modes, +The &kate; editor component supports several autoindenting modes, designed for different text formats. You can pick from the available modes using the ToolsIndentation menu. The autoindent modules also provides a function @@ -559,7 +593,7 @@ types. None -Selecting this mode turns automatic indenting off entirely. +Selecting this mode turns automatic indentation off entirely. @@ -577,15 +611,9 @@ C++, C#, java, javascript and so on. This indenter will not work with scripting languages such as Perl or PHP. - -SS C Style -An alternative indenter for C and similar languages, with the -same constraints. - - Python Style -An indenter specifically for the python scripting language. +An indenter specifically designed for the python scripting language. @@ -597,17 +625,16 @@ HTML tags (open tags like for example <br>) -Variable Indenter - - - -The variable indenter is experimental, and may change behavior or -disappear in future versions. - +S&S C Style +An alternative indenter for C and similar languages, with the +same constraints. + - -The variable indenter is special in that it can be configured using variables in -the document (or in a filetype configuration). The followwing variables are + +Variable Based Indenter + +The variable based indenter is special in that it can be configured using variables in +the document or in a filetype configuration. The following variables are read: @@ -615,9 +642,15 @@ read: var-indent-indent-after A regular expression which will cause a line to -be indented by one unit, if the first non-whitespace-only line above matches. -var-indent-indent: A regular expression, which will cause a matching line -to be indented by one unit. +be indented by one unit, if the first non-whitespace-only line above matches. + + + + +var-indent-indent + +A regular expression, which will cause a matching line +to be indented by one unit if matching. @@ -641,10 +674,10 @@ indention to be recalculated immediately when typed. var-indent-handle-couples -A list of parenthese sets to handle. Any combination -of 'parens' 'braces' and 'brackets'. Each set type is handled -the following way: If there are unmatched opening instances on the above line, -one indent unit is added, if there are unmatched closing instances on the +A list of paranthesis sets to handle. Any combination +of 'paranthesis', 'braces' and 'brackets'. Each set type is handled in +the following way. If there are unmatched opening instances on the above line, +one indent unit is added. If there are unmatched closing instances on the current line, one indent unit is removed. @@ -654,7 +687,7 @@ current line, one indent unit is removed. When looking for unmatched couple openings/closings, only characters with this attribute are considered. The value must be the -attribute name from the syntax xml file, for example "Symbol". If it's not +attribute name from the syntax xml file, for example "Symbol". If it is not specified, attribute 0 is used (usually 'Normal Text'). -- cgit v1.2.1