Warning, /utilities/kate/doc/katepart/part.docbook is written in an unsupported language. File is not indexed.
0001 <!--pulled in by kwrite too--> 0002 <chapter id="kate-part"> 0003 <chapterinfo> 0004 <authorgroup> 0005 <author>&Anders.Lund; &Anders.Lund.mail;</author> 0006 <author>&Dominik.Haumann; &Dominik.Haumann.mail;</author> 0007 <!-- TRANS:ROLES_OF_TRANSLATORS --> 0008 </authorgroup> 0009 </chapterinfo> 0010 <title>Working with the &kappname; editor</title> 0011 0012 <sect1 id="kate-part-overview"> 0013 0014 <title>Overview</title> 0015 0016 <para>The &kappname; editor is the editing area of the &kappname; window. This 0017 editor is shared between &kate; and &kwrite;, and it can also be used in &konqueror; 0018 for displaying text files from your local computer, or from the 0019 network.</para> 0020 0021 <para>The editor is composed of the following components:</para> 0022 0023 <variablelist> 0024 0025 <varlistentry> 0026 <term>The editing area</term> 0027 <listitem><para>This is where the text of your document is located.</para></listitem> 0028 </varlistentry> 0029 0030 <varlistentry> 0031 <term>The Scrollbars</term> 0032 <listitem> 0033 <para>The scrollbars indicate the position of the visible part of 0034 the document text, and can be used to move around the 0035 document. Dragging the scrollbars will not cause the insertion cursor 0036 to be moved.</para> 0037 <para>The scrollbars are displayed and hidden as required.</para> 0038 </listitem> 0039 </varlistentry> 0040 0041 <varlistentry> 0042 <term>The Icon Border</term> 0043 <listitem> 0044 <para>The icon border is a small pane on the left side of the editor, 0045 displaying a small icon next to marked lines.</para> 0046 <para>You can set or remove a <link 0047 linkend="kate-part-bookmarks">bookmark</link> in a visible line by 0048 clicking the &LMB; in the icon border next to that line.</para> 0049 <para>The display of the icon border can be toggled using the 0050 <menuchoice><guimenu>View</guimenu> <guimenuitem>Show Icon 0051 Border</guimenuitem></menuchoice> menu item.</para> 0052 </listitem> 0053 </varlistentry> 0054 0055 <varlistentry> 0056 <term>The Line Numbers Pane</term> 0057 <listitem> 0058 <para>The Line numbers pane shows the line numbers of all visible 0059 lines in the document.</para> 0060 <para>The display of the Line Numbers Pane can be toggled using the 0061 <menuchoice><guimenu>View</guimenu> <guimenuitem>Show Line 0062 Numbers</guimenuitem></menuchoice> menu item.</para> 0063 </listitem> 0064 </varlistentry> 0065 0066 <varlistentry> 0067 <term>The Folding Pane</term> 0068 <listitem> 0069 <para>The folding pane allows you to collapse or expand foldable blocks 0070 of lines. The calculation of the foldable regions is done according to 0071 rules in the syntax highlight definition for the document.</para> 0072 </listitem> 0073 </varlistentry> 0074 0075 </variablelist> 0076 0077 <itemizedlist> 0078 <title>Also in this Chapter:</title> 0079 <listitem><para><link linkend="kate-part-navigation">Navigating in the 0080 Text</link> </para></listitem> 0081 <listitem><para><link linkend="kate-part-selection">Working with the 0082 Selection</link></para></listitem> 0083 <listitem><para><link linkend="kate-part-copy-and-paste">Copying and 0084 Pasting Text</link></para></listitem> 0085 <listitem><para><link linkend="kate-part-find-replace">Finding and 0086 Replacing Text</link></para></listitem> 0087 <listitem><para><link linkend="kate-part-bookmarks">Using 0088 Bookmarks</link></para></listitem> 0089 <listitem><para><link linkend="kate-part-auto-wrap">Automatically 0090 Wrapping Text</link></para></listitem> 0091 <listitem><para><link linkend="kate-part-autoindent">Using automatic indenting</link></para></listitem> 0092 </itemizedlist> 0093 0094 </sect1> 0095 0096 <sect1 id="kate-part-navigation"> 0097 <title>Navigating in the Text</title> 0098 0099 <para>Moving around in the text in &kappname; is similar to most graphical text 0100 editors. You move the cursor using the arrow keys and the 0101 &PgUp;, &PgDn;, &Home; and &End; keys in combination with the &Ctrl; and 0102 &Shift; modifiers. The &Shift; key is always used 0103 to generate a selection, while the &Ctrl; key has different 0104 effects on different keys: 0105 <itemizedlist> 0106 <listitem><para>For the &Up; and &Down; keys it 0107 means scroll rather than move the cursor.</para></listitem> 0108 <listitem><para>For the &Left; and &Right; 0109 keys it means skip words rather than characters.</para></listitem> 0110 <listitem><para>For the &PgUp; and &PgDn; 0111 keys it means move to the visible edge of the view rather than browse.</para> 0112 </listitem> 0113 <listitem><para>For the &Home; and &End; keys it means move to the beginning or 0114 end of the document rather than the beginning or end of the line.</para></listitem> 0115 </itemizedlist> 0116 </para> 0117 0118 <para>&kappname; also provides you with a way to quickly jump to a matching brace 0119 or parenthesis: place the cursor on the inside of a parenthesis or brace 0120 character, and press <keycombo action="simul">&Ctrl;<keycap>6</keycap></keycombo> 0121 to jump to the matching parenthesis or brace.</para> 0122 0123 <para>In addition you can use 0124 <link linkend="kate-part-bookmarks">bookmarks</link> to quickly jump to 0125 positions that you define on your own.</para> 0126 0127 </sect1> 0128 0129 <sect1 id="kate-part-selection"> 0130 <title>Working with the Selection</title> 0131 0132 <para>There are two basic ways of selecting text in &kappname;: using the 0133 mouse, and using the keyboard.</para> 0134 0135 <para>To select using the mouse, hold down the &LMB; while dragging 0136 the mouse cursor from where the selection should start, to the desired 0137 end point. The text gets selected as you drag.</para> 0138 0139 <para>Double-clicking a word will select that word.</para> 0140 0141 <para>Triple-clicking in a line will select the entire line.</para> 0142 0143 <para>If &Shift; is held down while clicking, text will be 0144 selected:</para> 0145 0146 <itemizedlist> 0147 <listitem><para>If nothing is already selected, from the text cursor 0148 position to the mouse cursor position.</para></listitem> 0149 <listitem><para>If there is a selection, from and including that 0150 selection to the mouse cursor position.</para></listitem> 0151 </itemizedlist> 0152 0153 <note> 0154 <para>When selecting text by dragging the mouse, the 0155 selected text is copied to the clipboard, and can be pasted by 0156 clicking the middle mouse button in the editor, or in any other 0157 application to which you want to paste the text. 0158 </para> 0159 </note> 0160 0161 <para>To select using the keyboard, hold down the &Shift; key while 0162 using the navigation keys (Arrow keys, &PgUp;, &PgDn;, &Home; and 0163 &End;, possibly in combination with &Ctrl; to extend 0164 the move of the text cursor).</para> 0165 0166 <para>See also the section <link 0167 linkend="kate-part-navigation">Navigating in the Text</link> in this 0168 chapter.</para> 0169 0170 <para>To <action>Copy</action> the current selection, use the 0171 <menuchoice><guimenu>Edit</guimenu> 0172 <guimenuitem>Copy</guimenuitem></menuchoice> menu item or the keyboard 0173 shortcut (defaults to <keycombo 0174 action="simul">&Ctrl;<keycap>C</keycap></keycombo>).</para> 0175 0176 <para>To <action>Deselect</action> the current selection, use the 0177 <menuchoice><guimenu>Edit</guimenu> 0178 <guimenuitem>Deselect</guimenuitem></menuchoice> menu item, or the 0179 keyboard shortcut (default is <keycombo 0180 action="simul">&Ctrl;&Shift;<keycap>A</keycap></keycombo>), or click 0181 with the &LMB; in the editor.</para> 0182 0183 <sect2 id="kate-part-selection-block"> 0184 <title>Using Block Selection</title> 0185 0186 <para>When Block Selection is enabled, you can make <quote>vertical 0187 selections</quote> in the text, meaning selecting limited columns from 0188 multiple lines. This is handy for working with tab separated lines for 0189 example.</para> 0190 0191 <para>Block Selection can be toggled using the 0192 <menuchoice><guimenu>Edit</guimenu> <guimenuitem>Block 0193 Selection Mode</guimenuitem></menuchoice> menu item. The default keyboard 0194 shortcut is <keycombo action="simul">&Ctrl;&Shift;<keycap>B</keycap> 0195 </keycombo>.</para> 0196 0197 </sect2> 0198 0199 <sect2 id="kate-part-selection-overwrite"> 0200 <!-- term not used in settings Editing Text Seƶection Mode, it is called "Normal"--> 0201 <title>Using Overwrite Selection</title> 0202 0203 <para>If Overwrite Selection is enabled, typing or pasting text into 0204 the selection will cause the selected text to be replaced. If not 0205 enabled, new text will be added at the position of the text 0206 cursor.</para> 0207 0208 <para>Overwrite Selection is enabled by default.</para> 0209 0210 <para>To change the setting for this option, use the <link 0211 linkend="pref-edit-cursor-selection">Cursor & Selection</link> page of the <link 0212 linkend="config-dialog">Configuration Dialog</link>.</para> 0213 0214 </sect2> 0215 0216 <sect2 id="kate-part-selection-persistent"> 0217 0218 <title>Using Persistent Selection</title> 0219 0220 <para>When Persistent Selection is enabled, typing characters or 0221 moving the cursor will not cause the Selection to become 0222 deselected. This means that you can move the cursor away from the 0223 selection and type text.</para> 0224 0225 <para>Persistent Selection is disabled by default.</para> 0226 0227 <para>Persistent Selection can be enabled in the <link 0228 linkend="pref-edit-cursor-selection">Cursor & Selection</link> page of the <link 0229 linkend="config-dialog">Configuration Dialog</link>.</para> 0230 0231 <warning> <!-- is that still possible in 4.4? radio button Normal + Persistent!--> 0232 <para>If Persistent Selection and Overwrite Selection are both 0233 enabled, typing or pasting text when the text cursor is inside the 0234 selection will cause it to be replaced and deselected.</para> 0235 </warning> 0236 0237 </sect2> 0238 0239 </sect1> 0240 0241 <sect1 id="kate-part-copy-and-paste"> 0242 0243 <title>Copying and Pasting Text</title> 0244 0245 <para>To copy text, select it and use the 0246 <menuchoice><guimenu>Edit</guimenu> 0247 <guimenuitem>Copy</guimenuitem></menuchoice> menu item. Additionally, 0248 selecting text with the mouse will cause selected text to be copied to 0249 the X selection.</para> 0250 0251 <para>To paste the text currently in the clipboard, use the 0252 <menuchoice> 0253 <guimenu>Edit</guimenu><guimenuitem>Paste</guimenuitem></menuchoice> 0254 menu item.</para> 0255 0256 <para>Additionally, text selected with the mouse may be pasted by 0257 clicking the &MMB; at the desired position.</para> 0258 0259 <tip> 0260 <para>If you are using the &kde; desktop, you can retrieve earlier 0261 copied text from any application using the &klipper; icon in the 0262 system tray.</para> 0263 </tip> 0264 0265 </sect1> 0266 0267 <!-- changed in 4.5--> 0268 <sect1 id="kate-part-find-replace"> 0269 <title>Finding and Replacing Text</title> 0270 0271 <sect2 id="find-replace-bars"> 0272 <title>The Search and Replace Bars</title> 0273 0274 0275 <para>&kappname; has an incremental search bar and a power search and 0276 replace bar, which offers the means of entering a 0277 replacement string along with a few extra options.</para> 0278 0279 <para>The bars offer the following common options:</para> 0280 0281 <variablelist> 0282 0283 <varlistentry> 0284 <term><guilabel>Find</guilabel></term> 0285 <listitem><para>This is where to enter the search string. The interpretation of the string 0286 depends on some of the options described below.</para></listitem> 0287 </varlistentry> 0288 0289 <varlistentry> 0290 <term><guilabel>Match case</guilabel></term> 0291 <listitem> 0292 <para>If enabled, the search will be limited to entries that match the 0293 case (upper or lower) of each of the characters in the search pattern.</para> 0294 </listitem> 0295 </varlistentry> 0296 0297 </variablelist> 0298 0299 <para>The power search and replace bar offers some 0300 additional options:</para> 0301 0302 <variablelist> 0303 0304 <varlistentry> 0305 <term><guilabel>Plain Text</guilabel></term> 0306 <listitem> 0307 <para>Literally match any occurrence of the search string.</para> 0308 </listitem> 0309 </varlistentry> 0310 0311 <varlistentry> 0312 <term><guilabel>Whole Words</guilabel></term> 0313 <listitem> 0314 <para>If selected, the search will only match if there is a word 0315 boundary at both ends of the string matching, meaning not an 0316 alphanumeric character - either some other visible character or a line 0317 end.</para> 0318 </listitem> 0319 </varlistentry> 0320 0321 <varlistentry> 0322 <term><guilabel>Escape Sequences</guilabel></term> 0323 <listitem> 0324 <para>If selected, the <guibutton>Add</guibutton> menuitem at the 0325 bottom of the context menu of the text boxes will be enabled 0326 and allows you to add escape sequences to the 0327 search pattern from a predefined list.</para> 0328 </listitem> 0329 </varlistentry> 0330 0331 <varlistentry> 0332 <term><guilabel>Regular Expression</guilabel></term> 0333 <listitem> 0334 <para>If selected, the search string is interpreted as a regular 0335 expression. The <guibutton>Add</guibutton> menuitem at the 0336 bottom of the context menu of the text boxes will be enabled 0337 and allows you to add regular expression items to the 0338 search pattern from a predefined list.</para> 0339 <para>See <link linkend="regular-expressions">Regular 0340 Expressions</link> for more on these.</para> 0341 </listitem> 0342 </varlistentry> 0343 0344 <varlistentry> 0345 <term><guilabel>Search in the selection only</guilabel></term> 0346 <listitem> 0347 <para>If checked, the search and replace will be performed within 0348 the selected text only.</para> 0349 </listitem> 0350 </varlistentry> 0351 0352 <varlistentry> 0353 <term><guilabel>Find all</guilabel></term> 0354 <listitem> 0355 <para>Clicking this button highlights 0356 all matches in the document and shows the number of found matches in a small popup. 0357 </para></listitem> 0358 </varlistentry> 0359 0360 </variablelist> 0361 0362 </sect2> 0363 <!--FIXME keep in sync with kate/menus.docbook <varlistentry id="edit-find"> --> 0364 <sect2 id="finding-text"> 0365 <title>Finding Text</title> 0366 0367 <para>To find text, launch the incremental search bar 0368 with <keycombo action="simul">&Ctrl;<keycap>F</keycap></keycombo> or 0369 from the <menuchoice><guimenu>Edit</guimenu> 0370 <guimenuitem>Find...</guimenuitem></menuchoice> menu item.</para> 0371 <para>This opens the incremental search bar at the bottom of the editor window. 0372 On the left side of the bar is a button with an icon to close the bar, followed by a small text 0373 box for entering the search pattern.</para> 0374 <para>When you start entering the characters of your search pattern, the search starts 0375 immediately. If there is a match in the text this is highlighted and the background color 0376 of the entry field changes to light green. If the search pattern does not match any 0377 string in the text, this is indicated by a light red background color of the entry field.</para> 0378 <para>Use the 0379 <inlinemediaobject><imageobject><imagedata fileref="arrow-up-double-22.png" format="PNG"/></imageobject></inlinemediaobject> or 0380 <inlinemediaobject><imageobject><imagedata fileref="arrow-down-double-22.png" format="PNG"/></imageobject></inlinemediaobject> button 0381 to jump to the next or previous match in the document.</para> 0382 <para>Matches in the document are highlighted even when you close the search bar. To clear 0383 this highlighting, press the &Esc; key.</para> 0384 <para>You can choose whether the search should be case sensitive. 0385 Selecting <inlinemediaobject><imageobject><imagedata fileref="format-text-superscript-22.png" format="PNG"/></imageobject></inlinemediaobject> 0386 will limit finds to entries that match the 0387 case (upper or lower) of each of the characters in the search pattern.</para> 0388 <para>Click on the <inlinemediaobject><imageobject><imagedata fileref="configure-shortcuts-22.png" format="PNG"/></imageobject></inlinemediaobject> 0389 button at the right side of the incremental search bar to 0390 switch to the power search and replace bar. 0391 </para> 0392 <para> 0393 To repeat the last find operation, if any, without calling the incremental 0394 search bar, use <menuchoice> 0395 <shortcut><keycombo action="simul"><keycap>F3</keycap></keycombo></shortcut> 0396 <guimenu>Edit</guimenu><guimenuitem>Find Next</guimenuitem></menuchoice> 0397 or 0398 <menuchoice><shortcut> 0399 <keycombo action="simul">&Shift;<keycap>F3</keycap></keycombo></shortcut> 0400 <guimenu>Edit</guimenu><guimenuitem>Find Previous</guimenuitem></menuchoice>. 0401 </para> 0402 0403 </sect2> 0404 <!--FIXME keep in sync with kate/menus.docbook <varlistentry id="edit-replace"> --> 0405 <sect2 id="replacing-text"> 0406 <title>Replacing Text</title> 0407 0408 <para>To replace text, launch the power search and replace bar 0409 using the <menuchoice><guimenu>Edit</guimenu> 0410 <guimenuitem>Replace</guimenuitem></menuchoice> command, or the 0411 <keycombo action="simul">&Ctrl;<keycap>R</keycap></keycombo> shortcut.</para> 0412 <para>On the upper left side of the bar is a button with an icon to close the bar, followed by a small combo 0413 box for entering the search pattern. The box remembers recently used patterns.</para> 0414 <para>You can control the search mode by selecting the options <guilabel>Plain Text</guilabel>, 0415 <guilabel>Whole Words</guilabel>, <guilabel>Escape Sequences</guilabel> or 0416 <guilabel>Regular Expression</guilabel> from the drop down box. 0417 </para> 0418 <para>If <guilabel>Escape sequences</guilabel> or <guilabel>Regular expression</guilabel> are 0419 selected, the <guibutton>Add...</guibutton> menuitem at the bottom of the context menu of the text boxes will be enabled 0420 and allows you to add escape sequences or regular expression items to the 0421 search or replace pattern from predefined lists.</para> 0422 <para>Use the 0423 <inlinemediaobject><imageobject><imagedata fileref="arrow-up-double-22.png" format="PNG"/></imageobject></inlinemediaobject> or 0424 <inlinemediaobject><imageobject><imagedata fileref="arrow-down-double-22.png" format="PNG"/></imageobject></inlinemediaobject> button 0425 to jump to the next or previous match in the document.</para> 0426 <para>Enter the text to replace with in the text box labeled <guilabel>Replace</guilabel> 0427 and click the <guibutton>Replace</guibutton> button to replace only the highlighted text or 0428 the <guibutton>Replace All</guibutton> button to replace the search text in the whole document. 0429 </para> 0430 <para>You can modify the search and replace behavior by selecting different 0431 options at the bottom of the bar. 0432 Selecting <inlinemediaobject><imageobject><imagedata fileref="format-text-superscript-22.png" format="PNG"/></imageobject></inlinemediaobject> 0433 will limit finds to entries that match the 0434 case (upper or lower) of each of the characters in the search pattern. 0435 <inlinemediaobject><imageobject><imagedata fileref="edit-select-all-22.png" format="PNG"/></imageobject></inlinemediaobject> 0436 will search and replace within the current selection only. 0437 The <guilabel>Find All</guilabel> button highlights 0438 all matches in the document and shows the number of found matches in a small popup. 0439 </para> 0440 <para>Click on the <inlinemediaobject><imageobject><imagedata fileref="configure-shortcuts-22.png" format="PNG"/></imageobject></inlinemediaobject> 0441 button at the right side of the power search and replace bar to 0442 switch to the incremental search bar. 0443 </para> 0444 <tip> 0445 <para>If you are using a regular expression to find the text to replace, you can 0446 employ backreferences to reuse text captured in parenthesized subpatterns of the expression.</para> 0447 <para>See <link linkend="regular-expressions">Regular Expressions</link> for more 0448 on those.</para> 0449 </tip> 0450 0451 <tip><para>You can do <command>find</command>, <command>replace</command> and 0452 <command>ifind</command> (incremental search) from the 0453 <link linkend="advanced-editing-tools-commandline">command line</link>.</para> 0454 </tip> 0455 0456 </sect2> 0457 0458 </sect1> 0459 0460 <sect1 id="kate-part-bookmarks"> 0461 <title>Using Bookmarks</title> 0462 0463 <para>The bookmarks feature allows you to mark certain lines, to be 0464 able to easily find them again.</para> 0465 0466 <para>You can set or remove a bookmark in a line in two ways:</para> 0467 0468 <itemizedlist> 0469 <listitem> 0470 <para>Move the insertion cursor to the line and activate the 0471 <menuchoice><guimenu>Bookmarks</guimenu><guimenuitem>Set 0472 Bookmark</guimenuitem></menuchoice> (<keycombo 0473 action="simul">&Ctrl;<keycap>B</keycap></keycombo>) command.</para> 0474 </listitem> 0475 <listitem> 0476 <para>Click in the Icon Border next to the line.</para> 0477 </listitem> 0478 </itemizedlist> 0479 0480 0481 <para>Bookmarks are available in the <guimenu>Bookmarks</guimenu> 0482 menu. The individual bookmarks are available as menu items, labeled 0483 with the line number of the line with the bookmark, and the first few 0484 characters of the text in the line. To move the insertion cursor to 0485 the beginning of a bookmarked line, open the menu and select the 0486 bookmark.</para> 0487 0488 <para>To quickly move between bookmarks or to the next/previous bookmark, 0489 use the <menuchoice><guimenu>Bookmarks</guimenu><guimenuitem>Next</guimenuitem> 0490 </menuchoice> (<keycombo action="simul">&Alt;&PgDn;</keycombo>) or <menuchoice> 0491 <guimenu>Bookmarks</guimenu><guimenuitem>Previous</guimenuitem></menuchoice> 0492 (<keycombo action="simul">&Alt;&PgUp;</keycombo>) commands.</para> 0493 0494 </sect1> 0495 0496 <sect1 id="kate-part-auto-wrap"> 0497 <!--dynamic word wrap needs description here--> 0498 <title>Automatically Wrapping text</title> 0499 0500 <para>This feature allows you to have the text formatted in a very simple way: the text will be wrapped, 0501 so that no lines exceed a maximum number of characters per line, unless there is a longer string of 0502 non-whitespace characters.</para> 0503 0504 <para>To enable/disable it, check/uncheck the <guibutton>Static Word Wrap</guibutton> checkbox in the 0505 <link linkend="pref-word-wrap">edit page</link> of the <link linkend="config-dialog">configuration dialog</link>.</para> 0506 0507 <para>To set the maximum line width (maximum characters per line), use the 0508 <link linkend="pref-wrap-words-at"><guibutton>Wrap Words At</guibutton></link> 0509 option in the <link linkend="pref-edit">Editing</link> page of the <link linkend="config-dialog">configuration 0510 dialog</link>.</para> 0511 0512 <para>If enabled, 0513 it has the following effects: 0514 0515 <itemizedlist> 0516 <listitem><para>While typing, the editor will automatically insert a hard line break after 0517 the last whitespace character at a position before the maximum line width is reached.</para></listitem> 0518 <listitem><para>While loading a document, the editor will wrap the text in a similar way, so that 0519 no lines are longer than the maximum line width, if they contain any whitespace allowing that.</para></listitem> 0520 </itemizedlist> 0521 0522 </para> 0523 0524 <note><para>There is currently no way to set word wrap for document types, or even to enable or disable 0525 the feature on a per document level. This will be fixed in a future version of &kappname;.</para></note> 0526 0527 </sect1> 0528 0529 <sect1 id="kate-part-autoindent"> 0530 <title>Using automatic indenting</title> 0531 0532 <para>&kappname;s editor component supports a variety of autoindenting modes, 0533 designed for different text formats. You can pick from the available modes using 0534 the <menuchoice><guimenu>Tools</guimenu><guisubmenu>Indentation</guisubmenu></menuchoice> 0535 menu. The autoindent modules also provide a function 0536 <menuchoice><guimenu>Tools</guimenu><guimenuitem>Format Indentation</guimenuitem></menuchoice> 0537 which will recalculate the indentation of the selected or current line. Thus, 0538 you may reindent your entire document by selecting all the text and activating 0539 that action.</para> 0540 0541 <para>All the indent modes use the indentation related settings in the active 0542 document.</para> 0543 0544 <tip><para>You can set all sorts of configuration variables, including 0545 those related to indentation using 0546 <link linkend="config-variables">Document Variables</link> and 0547 <link linkend="pref-open-save-modes-filetypes">File types</link>.</para></tip> 0548 0549 <variablelist> 0550 0551 <title>Available Autoindent Modes</title> 0552 0553 <varlistentry> 0554 <term>None</term> 0555 <listitem><para>Selecting this mode turns automatic indenting off entirely.</para> 0556 </listitem> 0557 </varlistentry> 0558 0559 <varlistentry> 0560 <term>Normal</term> 0561 <listitem><para>This indenter simply keeps the indentation similar to the 0562 previous line with any content other than whitespace. You can combine this 0563 with using the indent and unindent actions for indenting to your own taste. 0564 </para></listitem> 0565 </varlistentry> 0566 0567 <varlistentry><term>C Style</term> 0568 <listitem><para>An indenter for C and similar languages, such as 0569 C++, C#, &Java;, &javascript; and so on. This indenter will not work with scripting 0570 languages such as Perl or PHP.</para></listitem> 0571 </varlistentry> 0572 0573 <varlistentry> 0574 <term>Haskell</term> 0575 <listitem><para>An indenter for the functional programming language Haskell. 0576 </para></listitem> 0577 </varlistentry> 0578 0579 <varlistentry> 0580 <term>Lilypond</term> 0581 <listitem><para>An indenter for the Lilypond notation language for music. 0582 </para></listitem> 0583 </varlistentry> 0584 0585 <varlistentry> 0586 <term>Lisp</term> 0587 <listitem><para>An indenter specifically for the Lisp scripting language and 0588 Lisp dialects. 0589 </para></listitem> 0590 </varlistentry> 0591 0592 <varlistentry> 0593 <term>Python</term> 0594 <listitem><para>An indenter specifically for the python scripting language. 0595 </para></listitem> 0596 </varlistentry> 0597 0598 <varlistentry> 0599 <term>XML Style</term> 0600 <listitem><para>An indenter specifically for XML like languages. 0601 </para></listitem> 0602 </varlistentry> 0603 <!--Ruby + Lua missing --> 0604 </variablelist> 0605 0606 </sect1> 0607 0608 <sect1 id="kate-part-line-modification"> 0609 <title>Line Modification Indicators</title> 0610 0611 <para>&kappname;'s line modification indicators let you easily see what you have 0612 recently changed in a file. By default, saved changes are indicated by a green 0613 bar to the left of a document, while unsaved changes are indicated by an orange 0614 bar.</para> 0615 0616 <para> 0617 <mediaobject> 0618 <imageobject><imagedata format="PNG" fileref="line-modification-system.png"/></imageobject> 0619 <caption><para>Line Modification Indicators in action.</para></caption> 0620 </mediaobject> 0621 </para> 0622 0623 <para>You can change the colors used in the 0624 <link linkend="prefcolors"><guilabel>Fonts & Colors</guilabel> configuration 0625 panel</link>, or you can disable this feature completely in the 0626 <link linkend="appearance-borders"><guilabel>Borders</guilabel> tab of the 0627 <guilabel>Appearance</guilabel> configuration panel</link>.</para> 0628 0629 </sect1> 0630 0631 <sect1 id="kate-part-scrollbar-minimap"> 0632 <title>The Scrollbar Minimap</title> 0633 0634 <para>&kappname;'s Scrollbar Minimap displays a preview of documents in place of 0635 the scrollbar. The currently visible portion of the document is highlighted. 0636 </para> 0637 0638 <para> 0639 <mediaobject> 0640 <imageobject><imagedata format="PNG" fileref="minimap.png"/></imageobject> 0641 <caption><para>The Scrollbar Minimap shows a preview of the &kate; source code. 0642 </para></caption> 0643 </mediaobject> 0644 </para> 0645 0646 <para>You can temporarily enable or disable the minimap by selecting 0647 <menuchoice><guimenu>View</guimenu><guimenuitem>View Scrollbar Minimap</guimenuitem></menuchoice> 0648 or permanently in <link linkend="appearance-borders">the Appearance section of 0649 &kappname;'s configuration</link>.</para> 0650 0651 </sect1> 0652 0653 <sect1 id="kate-part-multiple-cursors"> 0654 <title>Multiple cursors</title> 0655 0656 <para>Multiple cursor support was introduced with version 5.93 of katepart.</para> 0657 0658 <sect2 id="kate-part-create-multiple-cursors"> 0659 <title>Creating multiple cursors</title> 0660 0661 <itemizedlist> 0662 <listitem><para>To create them via mouse, use &Alt; + &LMB;. The modifier is configurable, see <link linkend="multicursor-modifier-configure">Configure multicursor modifier</link></para></listitem> 0663 0664 <listitem><para>To create via keyboard, press <keycombo action="simul">&Ctrl;&Alt;&Up;</keycombo> to create cursor above primary cursor and <keycombo action="simul">&Ctrl;&Alt;&Down;</keycombo> to create cursor below. These shortcuts are also configurable</para></listitem> 0665 0666 <listitem><para>To create cursors out of a selection, first select some text and then press <keycombo action="simul">&Shift;&Alt;<keycap>I</keycap></keycombo>. This will create a cursor at the end of each line in selection.</para></listitem> 0667 0668 <listitem><para>Use <keycombo action="simul">&Alt;<keycap>J</keycap></keycombo> to find the next occurrence of the word under cursor and select it + create a cursor. If you want to skip the current word under cursor, press <keycombo action="simul">&Alt;<keycap>K</keycap></keycombo> and it will mark the currently selected word as skipped. When you press <keycombo action="simul">&Alt;<keycap>J</keycap></keycombo> again it will unselect the current word and move to the next word.</para> 0669 </listitem> 0670 0671 <listitem><para>Use <keycombo action="simul">&Ctrl;&Alt;&Shift;<keycap>J</keycap></keycombo> to find all occurrences of the word under cursor and select them with a cursor at the end of each selection. You can use <keycombo action="simul">&Alt;<keycap>J</keycap></keycombo> to cycle through the selected words and use <keycombo action="simul">&Alt;<keycap>K</keycap></keycombo> to unselect any word as mentioned in the previous paragraph.</para></listitem> 0672 </itemizedlist> 0673 0674 </sect2> 0675 0676 <sect2><title>Working with multiple cursors</title> 0677 <para>Once you have created a few cursors, you can perform most of the editing operations on them as you would on a single cursor. 0678 For example, typing a letter will type it for each cursor. Similarly you can perform text transforms ⪚, capitalization 0679 for all the positions or selections.</para> 0680 0681 <para>Sometimes you will want to remove cursors. To do so, you can &Alt; + &LMB; on the cursor that you want to remove. If you just want to remove cursors on lines that are empty, there is a ready-made action for it that will do it for you. To invoke the action, open the Command Bar using <keycombo action="simul">&Ctrl;&Alt;<keycap>I</keycap></keycombo> and look for <guimenuitem>Remove cursors from empty lines</guimenuitem> and hit &Enter;. You can also configure a shortcut for this action.</para> 0682 0683 </sect2> 0684 0685 </sect1> 0686 0687 </chapter>