Warning, /utilities/kate/doc/katepart/configuring.docbook is written in an unsupported language. File is not indexed.
0001 <chapter id="config-dialog"> 0002 <title>Configure &kappname;</title> 0003 <para> 0004 Selecting <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure 0005 <replaceable>Application</replaceable>...</guimenuitem></menuchoice> from the menu brings up the 0006 <guilabel>Configure</guilabel> dialog box. This dialog can be 0007 used to alter a number of different settings. The settings available 0008 for change vary according to which category the user chooses from a 0009 vertical list on the left side of the dialog. By means of three buttons 0010 along the bottom of the box the user can control the process. 0011 </para> 0012 0013 <para> 0014 You may invoke the <guilabel>Help</guilabel> system, accept the 0015 current settings and close the dialog by means of the 0016 <guibutton>OK</guibutton> button, or <guibutton>Cancel</guibutton> the 0017 process. The categories <guilabel>Appearance</guilabel>, 0018 <guilabel>Fonts & Colors</guilabel>, <guilabel>Editing</guilabel>, 0019 <guilabel>Open/Save</guilabel> and 0020 <guilabel>Extensions</guilabel> are detailed below. 0021 </para> 0022 0023 <sect1 id="config-dialog-editor"> 0024 <title>The Editor Component Configuration</title> 0025 <para>This group contains all pages related to the editor component of 0026 &kappname;. Most of the settings here are defaults, they can be overridden by 0027 <link linkend="pref-open-save-modes-filetypes">defining a filetype</link>, 0028 by <link linkend="config-variables">Document Variables</link> or 0029 by changing them per document during an editing session.</para> 0030 <sect2 id="appearance"> 0031 <title>Appearance</title> 0032 0033 <sect3 id="appearance-general"> 0034 <title>General</title> 0035 0036 <variablelist> 0037 <varlistentry> 0038 <term><guilabel>Editor font</guilabel></term> 0039 <listitem> 0040 <para> 0041 Here you can choose the font of the editor text. You can choose from 0042 any font available on your system, and set a default size. A sample text 0043 is displayed at the bottom of the dialog, so you can see the effect of your choices. 0044 </para> 0045 <para>For more information about selecting a font, see the 0046 <ulink url="help:/fundamentals/fonts.html"><emphasis>Choosing Fonts</emphasis> 0047 section of the <emphasis>&kde; Fundamentals</emphasis> documentation</ulink>.</para> 0048 </listitem> 0049 </varlistentry> 0050 0051 <varlistentry> 0052 <term><guilabel>Show whitespace indicators</guilabel></term> 0053 <listitem> 0054 <variablelist> 0055 <varlistentry> 0056 <term><guilabel>Never</guilabel></term> 0057 <listitem><para>The editor will never display dots to indicate the presence of whitespace.</para></listitem> 0058 </varlistentry> 0059 <varlistentry> 0060 <term><guilabel>At the end of a line</guilabel></term> 0061 <listitem><para>The editor will display dots to indicate the presence of extra 0062 whitespace at the end of lines.</para></listitem> 0063 </varlistentry> 0064 <varlistentry> 0065 <term><guilabel>Always</guilabel></term> 0066 <listitem><para>The editor will always display dots to indicate the presence of whitespace.</para></listitem> 0067 </varlistentry> 0068 </variablelist> 0069 </listitem> 0070 </varlistentry> 0071 <varlistentry> 0072 <term><guilabel>Whitespace indicator size</guilabel></term> 0073 <listitem><para>Use the slider to change the size of the visible indicator marker.</para></listitem> 0074 </varlistentry> 0075 <varlistentry> 0076 <term><guilabel>Show tab indicators</guilabel></term> 0077 <listitem><para>When checked the editor will display a » symbol to indicate the presence 0078 of a tab in the text.</para></listitem> 0079 </varlistentry> 0080 <varlistentry> 0081 <term><guilabel>Show focus frame around editor</guilabel></term> 0082 <listitem><para>When checked the editor shows focus frame around the main source text control.</para></listitem> 0083 </varlistentry> 0084 0085 <varlistentry> 0086 <term><guilabel>Bracket matching 0087 </guilabel></term> 0088 <listitem><para> 0089 <variablelist> 0090 <varlistentry> 0091 <term><guilabel>Highlight range between selected brackets 0092 </guilabel></term> 0093 <listitem><para>If this is enabled, the range between the selected matching brackets will be highlighted.</para></listitem> 0094 </varlistentry> 0095 <varlistentry> 0096 <term><guilabel>Show preview of matching open bracket 0097 </guilabel></term> 0098 <listitem><para>When enabled, the editor will show a tooltip of the matching open bracket.</para></listitem> 0099 </varlistentry> 0100 <varlistentry> 0101 <term><guilabel>Flash matching bracket when cursor moves to other bracket in pair 0102 </guilabel></term> 0103 <listitem><para>If enabled, moving on the brackets (<keycap>{</keycap>, <keycap>[</keycap>, 0104 <keycap>]</keycap>, <keycap>}</keycap>,<keycap>(</keycap> or <keycap>)</keycap>) will 0105 quickly flash the matching bracket.</para></listitem> 0106 </varlistentry> 0107 </variablelist> 0108 </para></listitem> 0109 </varlistentry> 0110 0111 <varlistentry> 0112 <term><guilabel>Show indentation lines 0113 </guilabel></term> 0114 <listitem><para>If this is checked, the editor will display 0115 vertical lines to help identifying indent lines.</para></listitem> 0116 </varlistentry> 0117 0118 <varlistentry> 0119 <term><guilabel>Counts 0120 </guilabel></term> 0121 <listitem><para> 0122 <variablelist> 0123 <varlistentry> 0124 <term><guilabel>Show word count 0125 </guilabel></term> 0126 <listitem><para>Displays the number of words and characters in the document and 0127 in the current selection in the status bar. 0128 This option is also available in the status bar context menu.</para></listitem> 0129 </varlistentry> 0130 <varlistentry> 0131 <term><guilabel>Show line count 0132 </guilabel></term> 0133 <listitem><para>Displays the number of total lines in the document in the status bar. 0134 This option is also available in the status bar context menu.</para></listitem> 0135 </varlistentry> 0136 </variablelist> 0137 </para> 0138 </listitem> 0139 </varlistentry> 0140 0141 <varlistentry> 0142 <term><guilabel>Fold first line 0143 </guilabel></term> 0144 <listitem><para>If enabled, the first line is folded, if possible. This is useful, 0145 if the file starts with a comment, such as a copyright</para></listitem> 0146 </varlistentry> 0147 0148 <varlistentry> 0149 <term><guilabel>Dynamic Word Wrap</guilabel></term> 0150 <listitem> 0151 <para>If this option is checked, the text lines 0152 will be wrapped at the view border on the screen.</para> 0153 <para> 0154 <variablelist> 0155 <varlistentry> 0156 <term><guilabel>Wrap dynamically at static word wrap marker 0157 </guilabel></term> 0158 <listitem><para>When checked, editor wraps lines dynamically at the <link linkend="pref-word-wrap">static word wrap position</link>.</para></listitem> 0159 </varlistentry> 0160 <varlistentry> 0161 <term><guilabel>Disregard word boundaries for dynamic wrapping 0162 </guilabel></term> 0163 <listitem><para>When checked, the editor does not take into account word boundaries when wrapping text lines.</para></listitem> 0164 </varlistentry> 0165 </variablelist> 0166 </para> 0167 </listitem> 0168 </varlistentry> 0169 <varlistentry> 0170 <term><guilabel>Dynamic word wrap indicators</guilabel></term> 0171 <listitem><para>Choose when the Dynamic word wrap indicators 0172 should be displayed, either <guilabel>Off</guilabel>, <guilabel>Follow Line 0173 Numbers</guilabel> or <guilabel>Always on</guilabel>. 0174 </para></listitem></varlistentry> 0175 <varlistentry> 0176 <term><guilabel>Indent wrapped lines 0177 </guilabel></term> 0178 <listitem><para>Additionally, this allows you to 0179 set a maximum width of the screen, as a percentage, 0180 after which dynamically wrapped lines will no longer be vertically aligned. 0181 For example, at 50%, lines whose indentation levels are deeper than 50% of the 0182 width of the screen will not have vertical alignment applied to subsequent 0183 wrapped lines.</para></listitem> 0184 </varlistentry> 0185 <varlistentry> 0186 <term><guilabel>Line Height Multiplier 0187 </guilabel></term> 0188 <listitem><para>This value will be multiplied by the font's default line height. A value 0189 of 1.0 means that the default height will be used.</para></listitem></varlistentry> 0190 </variablelist> 0191 </sect3> 0192 0193 <sect3 id="appearance-borders"> 0194 <title>Borders</title> 0195 0196 <variablelist> 0197 <varlistentry> 0198 <term><guilabel>Code block folding</guilabel></term> 0199 <listitem> 0200 <variablelist> 0201 <varlistentry> 0202 <term><guilabel>Show arrows to collapse code blocks 0203 </guilabel></term> 0204 <listitem><para>If this option is checked, the current view will display marks 0205 for code folding, if code folding is available.</para></listitem> 0206 </varlistentry> 0207 <varlistentry> 0208 <term><guilabel>Show preview of folded blocks on hover 0209 </guilabel></term> 0210 <listitem><para>If checked, hovering over a folded region shows a preview of the folded text 0211 in a popup.</para></listitem> 0212 </varlistentry> 0213 </variablelist> 0214 </listitem> 0215 </varlistentry> 0216 </variablelist> 0217 0218 <variablelist> 0219 <varlistentry> 0220 <term><guilabel>Folding arrows visibility</guilabel></term> 0221 <listitem><para>Switch the folding arrows between <guimenuitem>Show on Hover</guimenuitem> 0222 and <guimenuitem>Show Always</guimenuitem>. 0223 </para></listitem> 0224 </varlistentry> 0225 </variablelist> 0226 0227 <variablelist> 0228 <varlistentry> 0229 <term><guilabel>Left side</guilabel></term> 0230 <listitem> 0231 <variablelist> 0232 <varlistentry> 0233 <term><guilabel>Show marks 0234 </guilabel></term> 0235 <listitem><para>If this is checked, you will see an icon border on the left 0236 hand side. The icon border shows bookmark signs for instance.</para></listitem> 0237 </varlistentry> 0238 <varlistentry> 0239 <term><guilabel>Show line numbers 0240 </guilabel></term> 0241 <listitem><para>If this is checked, you will see line numbers on the left 0242 hand side.</para></listitem> 0243 </varlistentry> 0244 <varlistentry> 0245 <term><guilabel>Highlight changed and unsaved lines 0246 </guilabel></term> 0247 <listitem><para>If this is checked, line modification markers will be visible. 0248 For more information, see <xref linkend="kate-part-line-modification"/>. 0249 </para></listitem> 0250 </varlistentry> 0251 </variablelist> 0252 </listitem> 0253 </varlistentry> 0254 </variablelist> 0255 0256 <variablelist> 0257 <varlistentry> 0258 <term><guilabel>Scrollbars</guilabel></term> 0259 <listitem> 0260 <variablelist> 0261 <varlistentry> 0262 <term><guilabel>Show marks 0263 </guilabel></term> 0264 <listitem><para>If this option is checked the current view 0265 will show marks on the vertical scrollbar. These marks will 0266 for instance show bookmarks.</para></listitem> 0267 </varlistentry> 0268 <varlistentry> 0269 <term><guilabel>Show preview when hovering over scrollbar</guilabel></term> 0270 <listitem><para>If this option is checked, and you hover the scrollbar with the mouse cursor 0271 a small text preview with several lines of the current document around the cursor position will be displayed. 0272 This allows you to quickly switch to another part of the document.</para> 0273 </listitem> 0274 </varlistentry> 0275 </variablelist> 0276 </listitem> 0277 </varlistentry> 0278 </variablelist> 0279 0280 <variablelist> 0281 <varlistentry> 0282 <term><guilabel>Minimap</guilabel></term> 0283 <listitem> 0284 <variablelist> 0285 <varlistentry> 0286 <term><guilabel>Show minimap</guilabel></term> 0287 <listitem><para>If this option is checked, every new view will show a minimap of the 0288 document on the vertical scrollbar.</para> 0289 <para>For more information on the scrollbar minimap, see 0290 <xref linkend="kate-part-scrollbar-minimap"/>.</para></listitem> 0291 </varlistentry> 0292 <varlistentry> 0293 <term><guilabel>Minimap Width</guilabel></term> 0294 <listitem><para>Adjusts the width of the scrollbar mini-map, defined in pixels. 0295 </para></listitem> 0296 </varlistentry> 0297 <varlistentry> 0298 <term><guilabel>Scrollbars visibility</guilabel></term> 0299 <listitem><para>Switch the scrollbar on, off or show the scrollbar only when needed. 0300 Click with the &LMB; on the blue rectangle to display the line number range of the document displayed on the screen. 0301 Keep the &LMB; pressed outside the blue rectangle to automatically scroll through the document. 0302 </para></listitem> 0303 </varlistentry> 0304 </variablelist> 0305 </listitem> 0306 </varlistentry> 0307 </variablelist> 0308 0309 <variablelist> 0310 <varlistentry> 0311 <term><guilabel>Sort bookmarks menu</guilabel></term> 0312 <listitem> 0313 <variablelist> 0314 <varlistentry> 0315 <term><guilabel>By date created 0316 </guilabel></term> 0317 <listitem><para>Each new bookmark will be added to the bottom, 0318 independently from where it is placed in the document.</para></listitem> 0319 </varlistentry> 0320 <varlistentry> 0321 <term><guilabel>By line number 0322 </guilabel></term> 0323 <listitem><para>The bookmarks will be ordered by the line 0324 numbers they are placed at.</para></listitem> 0325 </varlistentry> 0326 </variablelist> 0327 </listitem> 0328 </varlistentry> 0329 </variablelist> 0330 0331 </sect3> 0332 </sect2> 0333 0334 <sect2 id="prefcolors"> 0335 <title>Color Themes</title> 0336 0337 <para>This section of the dialog lets you configure all colors in 0338 any color theme you have, and create new themes, delete existing 0339 ones or just <guilabel>Follow System Color Scheme</guilabel>. 0340 Each scheme has settings for colors and normal and highlighted text 0341 styles. 0342 </para> 0343 0344 <para>&kappname; will preselect the currently active theme for you, if you want to 0345 work on a different theme start by selecting that from the 0346 <guilabel>Select theme</guilabel> combobox. With the <guibutton>Copy</guibutton> and <guibutton>Delete</guibutton> 0347 buttons you can create a new theme (copying an existing one) or delete existing ones.</para> 0348 0349 <para>This is described in detail in <xref linkend="color-themes-gui"/>.</para> 0350 0351 </sect2> 0352 0353 <sect2 id="pref-edit"> 0354 <title>Editing</title> 0355 0356 <sect3 id="pref-edit-general"> 0357 <title>General</title> 0358 <variablelist> 0359 0360 <varlistentry> 0361 <term id="pref-word-wrap"><guilabel>Word wrap</guilabel></term> 0362 <listitem><para> 0363 Word wrap is a feature that causes the editor to automatically start a new line 0364 of text and move (wrap) the cursor to the beginning of that new line. &kappname; 0365 will automatically start a new line of text when the current line reaches the 0366 length specified by the <link linkend="pref-wrap-words-at">Wrap words 0367 at:</link> option.</para> 0368 <variablelist> 0369 <varlistentry> 0370 <term><guilabel>Wrap words at a fixed column</guilabel></term> 0371 <listitem> 0372 <para>Turns static word wrap on or off.</para> 0373 </listitem> 0374 </varlistentry> 0375 <varlistentry> 0376 <term><guilabel>Draw vertical line at the word wrap column</guilabel></term> 0377 <listitem> 0378 <para>If this option is checked, a vertical line will be drawn at the word wrap 0379 column as defined in the <menuchoice> <guimenu>Settings</guimenu> 0380 <guimenuitem>Configure Editor...</guimenuitem></menuchoice> in the Editing tab. 0381 Please note that the word wrap marker is only drawn if you use a fixed pitch 0382 font.</para> 0383 </listitem> 0384 </varlistentry> 0385 <varlistentry> 0386 <term id="pref-wrap-words-at"><guilabel>Wrap words at:</guilabel></term> 0387 <listitem> 0388 <para>If the <link linkend="pref-word-wrap">Wrap words at a fixed column</link> option is selected 0389 this entry determines the length (in characters) at which the editor will 0390 automatically start a new line.</para> 0391 </listitem> 0392 </varlistentry> 0393 </variablelist> 0394 </listitem> 0395 </varlistentry> 0396 <varlistentry> 0397 <term><guilabel>Default input mode</guilabel></term> <listitem><para> 0398 The selected input mode will be enabled when opening a new view. 0399 You can still toggle the vi input mode on/off for a particular view in the 0400 <guimenu>Edit</guimenu> menu. 0401 </para> 0402 </listitem> 0403 </varlistentry> 0404 0405 <varlistentry> 0406 <term><guilabel>Brackets</guilabel></term> <listitem> 0407 <para>If the <guilabel>Automatically close brackets when opening bracket is typed</guilabel> option is selected when 0408 the user types a left bracket (<keycap>[</keycap>, <keycap>(</keycap>, or <keycap>{</keycap>) 0409 &kappname; automatically enters the right bracket (<keycap>}</keycap>, <keycap>)</keycap>, 0410 or <keycap>]</keycap>) to the right of the cursor.</para> 0411 </listitem> 0412 </varlistentry> 0413 0414 <varlistentry> 0415 <term><guilabel>Enclosing characters</guilabel></term> <listitem> 0416 <para>It is possible to select the enclosing characters using the corresponding drop-down list.</para> 0417 <para>When text is selected, typing one of these characters wraps the selected text.</para> 0418 </listitem> 0419 </varlistentry> 0420 0421 <varlistentry> 0422 <term ><guilabel>Copy and paste</guilabel></term> 0423 <listitem> 0424 <variablelist> 0425 <varlistentry> 0426 <term><guilabel>Move selected text when dragged</guilabel></term> <listitem> 0427 <para>This option enables drag-and-drop of the selected text inside the editor window.</para></listitem> 0428 </varlistentry> 0429 <varlistentry> 0430 <term><guilabel>Copy/cut the current line if invoked without any text selected</guilabel></term> <listitem> 0431 <para>If this option is enabled and the text selection is empty, copy and cut 0432 action are performed for the line of text at the actual cursor position.</para></listitem> 0433 </varlistentry> 0434 <varlistentry> 0435 <term><guilabel>Don't move the text cursor when pasting by mouse</guilabel></term> <listitem> 0436 <para>If this option is enabled and you paste some text in the editor window with the &MMB; clicking, &kappname; 0437 will not move the text cursor into the clicked position.</para></listitem> 0438 </varlistentry> 0439 </variablelist> 0440 </listitem> 0441 </varlistentry> 0442 0443 </variablelist> 0444 </sect3> 0445 0446 <sect3 id="pref-edit-cursor-selection"> 0447 <title>Text Navigation</title> 0448 0449 <variablelist> 0450 0451 <varlistentry> 0452 <term><guilabel>Text Cursor Movement</guilabel></term> 0453 <listitem> 0454 <variablelist> 0455 <varlistentry> 0456 <term><guilabel>Smart home and smart end</guilabel></term> 0457 <listitem> 0458 <para>When selected, pressing the home key will cause the cursor to 0459 skip white space and go to the start of a line's text.</para> 0460 </listitem> 0461 </varlistentry> 0462 <varlistentry> 0463 <term><guilabel>PageUp/PageDown moves cursor</guilabel></term> 0464 <listitem> 0465 <para>This option changes the behavior of the cursor when the user presses 0466 the &PgUp; or &PgDn; key. If unselected the text cursor will maintain its 0467 relative position within the visible text in &kappname; as new text becomes 0468 visible as a result of the operation. So if the 0469 cursor is in the middle of the visible text when the operation occurs it will 0470 remain there (except when one reaches the beginning or end.) With this option 0471 selected, the first key press will cause the cursor to move to either the top or 0472 bottom of the visible text as a new page of text is displayed.</para> 0473 </listitem> 0474 </varlistentry> 0475 <varlistentry> 0476 <term><guilabel>Enable camel case cursor movement</guilabel></term> 0477 <listitem> 0478 <para>This option changes the behavior of the cursor when the user presses 0479 the <keycombo>&Ctrl;<keycap>Left arrow</keycap></keycombo> or 0480 <keycombo>&Ctrl;<keycap>Right arrow</keycap></keycombo> shortcut. If unselected 0481 the text cursor jumps over the full words. With this option 0482 selected, the cursor jumps break at camel case humps.</para> 0483 </listitem> 0484 </varlistentry> 0485 <varlistentry> 0486 <term><guilabel>Autocenter cursor:</guilabel></term> 0487 <listitem> 0488 <para>Sets the number of lines to maintain visible above and below the cursor 0489 when possible.</para> 0490 </listitem> 0491 </varlistentry> 0492 </variablelist> 0493 </listitem> 0494 </varlistentry> 0495 0496 <varlistentry> 0497 <term><guilabel>Text Selection Mode</guilabel></term> 0498 <listitem> 0499 <variablelist> 0500 <varlistentry> 0501 <term><guilabel>Normal</guilabel></term> 0502 <listitem> 0503 <para>Selections will be overwritten by typed text and will be lost on 0504 cursor movement.</para> 0505 </listitem> 0506 </varlistentry> 0507 <varlistentry> 0508 <term><guilabel>Persistent</guilabel></term> 0509 <listitem> 0510 <para>Selections will stay even after cursor movement and typing.</para> 0511 </listitem> 0512 </varlistentry> 0513 <varlistentry> 0514 <term><guilabel>Allow scrolling past the end of the document</guilabel></term> <listitem> 0515 <para>This option lets you scroll past the end of the document. This can be used to vertically centre the bottom of the document, or put it on top of the current view.</para></listitem> 0516 </varlistentry> 0517 <varlistentry> 0518 <term><guilabel>Backspace key removes character’s base with its diacritics</guilabel></term> <listitem> 0519 <para>When selected, composed characters are removed with their diacritics instead 0520 of only removing the base character. This is useful for Indic locales.</para></listitem> 0521 </varlistentry> 0522 0523 </variablelist> 0524 </listitem> 0525 </varlistentry> 0526 0527 <varlistentry id="multicursor-modifier-configure"> 0528 <term><guilabel>Multicursor modifier</guilabel></term> 0529 <listitem> 0530 <para>This option lets you set the modifier that will be used to create multiple cursors with &LMB; click. You need to press the modifiers and click &LMB; to create a cursor at the desired location. See <link linkend="kate-part-create-multiple-cursors">Creating multiple cursors</link> to discover other ways to create multiple cursors.</para> 0531 </listitem> 0532 </varlistentry> 0533 0534 </variablelist> 0535 </sect3> 0536 0537 <sect3 id="pref-edit-indent"> 0538 <title>Indentation</title> 0539 0540 <variablelist> 0541 0542 <varlistentry> 0543 <term><guilabel>Default indentation mode:</guilabel></term> 0544 <listitem> 0545 <para>Select the automatic indentation mode you want to use as default. It is 0546 strongly recommended to use <userinput>None</userinput> or 0547 <userinput>Normal</userinput> here, and use filetype configurations to set other 0548 indentation modes for text formats like C/C++ code or &XML;.</para> 0549 </listitem> 0550 </varlistentry> 0551 0552 <varlistentry> 0553 <term><guilabel>Indent using</guilabel></term> 0554 <listitem> 0555 <variablelist> 0556 <varlistentry> 0557 <term><guilabel>Tabulators</guilabel></term> 0558 <listitem> 0559 <para>When this is enabled the editor will insert tabulator characters when you 0560 press the 	 key or use <link linkend="kate-part-autoindent">automatic 0561 indentation</link>.</para> 0562 </listitem> 0563 </varlistentry> 0564 <varlistentry> 0565 <term><guilabel>Spaces</guilabel></term> 0566 <listitem> 0567 <para>When this is enabled the editor will insert a calculated number of spaces 0568 according to the position in the text and the <option>tab-width</option> setting 0569 when you press the 	 key or use <link linkend="kate-part-autoindent">automatic 0570 indentation</link>.</para> 0571 </listitem> 0572 </varlistentry> 0573 <varlistentry> 0574 <term><guilabel>Tabulators and Spaces</guilabel></term> 0575 <listitem> 0576 <para>When this is enabled, the editor will insert spaces as describe above when 0577 indenting or pressing 	 at the beginning of a line, but insert tabulators when 0578 the 	 key is pressed in the middle or end of a line.</para> 0579 </listitem> 0580 </varlistentry> 0581 <varlistentry> 0582 <term><guilabel>Tab width:</guilabel></term> 0583 <listitem> 0584 <para>This configures the number of spaces that are displayed in place of a tabulator 0585 character.</para> 0586 </listitem> 0587 </varlistentry> 0588 <varlistentry> 0589 <term><guilabel>Indentation width:</guilabel></term> 0590 <listitem> 0591 <para>The indentation width is the number of spaces which is used to indent a line. 0592 If configured to indent using tabulators, a tabulator character is inserted 0593 if the indentation is divisible by the tab width.</para> 0594 </listitem> 0595 </varlistentry> 0596 </variablelist> 0597 </listitem> 0598 </varlistentry> 0599 0600 <varlistentry> 0601 <term><guilabel>Indentation Properties</guilabel></term> 0602 <listitem> 0603 <variablelist> 0604 <varlistentry> 0605 <term><guilabel>Keep extra spaces</guilabel></term> 0606 <listitem><para>If this option is disabled, changing the indentation 0607 level aligns a line to a multiple of the width specified in 0608 <guilabel>Indentation width</guilabel>.</para></listitem> 0609 </varlistentry> 0610 <varlistentry> 0611 <term><guilabel>Adjust indentation of text pasted from the clipboard</guilabel></term> 0612 <listitem> 0613 <para>If this option is selected, text pasted from the clipboard is indented. 0614 Triggering the <guimenuitem>Undo</guimenuitem> action removes the indentation.</para> 0615 </listitem> 0616 </varlistentry> 0617 </variablelist> 0618 </listitem> 0619 </varlistentry> 0620 0621 <varlistentry> 0622 <term><guilabel>Indentation Actions</guilabel></term> 0623 <listitem> 0624 <variablelist> 0625 <varlistentry> 0626 <term><guilabel>Backspace key in leading blank space unindents</guilabel></term> 0627 <listitem> 0628 <para>If this option is selected, the &Backspace; key decreases the indentation level 0629 if the cursor is located in the leading blank space of a line.</para> 0630 </listitem> 0631 </varlistentry> 0632 <varlistentry> 0633 <term><guilabel>Tab key action (if no selection exists)</guilabel></term> 0634 <listitem> 0635 <para> 0636 If you want 	 to align the current line in the current code block 0637 like in &Emacs;, make 	 a shortcut to the action <guimenuitem>Format Indentation</guimenuitem>. 0638 </para> 0639 <variablelist> 0640 <varlistentry> 0641 <term><guilabel>Always advance to the next tab position</guilabel></term> 0642 <listitem> 0643 <para>If this option is selected, the 	 key always inserts white space 0644 so that the next tab position is reached. If the option <guilabel>Insert spaces instead of tabulators</guilabel> 0645 on the <guilabel>General</guilabel> tab in the <guilabel>Editing</guilabel> 0646 page is enabled, spaces are inserted; otherwise, a single tabulator is inserted.</para> 0647 </listitem> 0648 </varlistentry> 0649 <varlistentry> 0650 <term><guilabel>Always increase indentation level</guilabel></term> 0651 <listitem> 0652 <para>If this option is selected, the 	 key always indents the current 0653 line by the number of character positions specified in <guilabel>Indentation width</guilabel>.</para> 0654 </listitem> 0655 </varlistentry> 0656 0657 <varlistentry> 0658 <term><guilabel>Increase indentation level if in leading blank space</guilabel></term> 0659 <listitem> 0660 <para>If this option is selected, the 	 key either indents the current line 0661 or advances to the next tab position. If the insertion point is at or before the 0662 first non-space character in the line, or if there is a selection, the current line 0663 is indented by the number of character positions specified in <guilabel>Indentation width</guilabel>. 0664 If the insertion point is located after the first non-space character in the line 0665 and there is no selection, white space is inserted so that the next tab position is 0666 reached: if the option <guilabel>Insert spaces instead of tabulators</guilabel> 0667 on the <guilabel>General</guilabel> tab in the <guilabel>Editing</guilabel> 0668 page is enabled, spaces are inserted; otherwise, a single tabulator is inserted.</para> 0669 </listitem> 0670 </varlistentry> 0671 </variablelist> 0672 0673 </listitem> 0674 </varlistentry> 0675 0676 </variablelist> 0677 </listitem> 0678 </varlistentry> 0679 0680 </variablelist> 0681 </sect3> 0682 0683 <sect3 id="pref-edit-autocompletion"> 0684 <title>Auto Completion</title> 0685 <variablelist> 0686 <varlistentry> 0687 <term><guilabel>General</guilabel></term> 0688 <listitem> 0689 <variablelist> 0690 <varlistentry> 0691 <term><guilabel>Enable auto completion</guilabel></term> 0692 <listitem> 0693 <para>If enabled, a word completion box automatically pops up during typing 0694 showing a list of text entries to complete the current text under the 0695 cursor.</para> 0696 </listitem> 0697 </varlistentry> 0698 <varlistentry> 0699 <term><guilabel>Auto select first completion entry</guilabel></term> 0700 <listitem> 0701 <para>If enabled, the first auto completion item is always preselected so you can insert it with 0702 &Enter;. If you do not want such behavior, ⪚ if you want pressing &Enter; to only insert a newline, 0703 then disable this item.</para> 0704 </listitem> 0705 </varlistentry> 0706 </variablelist> 0707 </listitem> 0708 </varlistentry> 0709 0710 <varlistentry> 0711 <term><guilabel>Minimal word length to complete</guilabel></term> 0712 <listitem><para>While typing text, the word completion searches for words in the 0713 document starting with the already typed text. This option configures the minimal 0714 amount of characters that are needed to make the word completion active and pop 0715 up a completion box.</para></listitem> 0716 </varlistentry> 0717 0718 <varlistentry> 0719 <term><guilabel>Remove tail on complete</guilabel></term> 0720 <listitem><para>Remove the tail of a previous word when the completion item is chosen from a list. 0721 </para></listitem> 0722 </varlistentry> 0723 0724 <varlistentry> 0725 <term><guilabel>Keyword completion 0726 </guilabel></term> 0727 <listitem><para>If enabled, the built-in autocompletion uses the keywords defined by the syntax highlighting. 0728 </para></listitem> 0729 </varlistentry> 0730 0731 </variablelist> 0732 0733 </sect3> 0734 0735 <sect3 id="pref-edit-spellcheck"> 0736 <title>Spellcheck</title> 0737 <para>These configuration options are described in the documentation for the 0738 &systemsettings; module <ulink url="help:/kcontrol/spellchecking">Spell Checker</ulink>.</para> 0739 </sect3> 0740 0741 <sect3 id="pref-edit-vi-input-mode"> 0742 <title>Vi Input Mode</title> 0743 <variablelist> 0744 <varlistentry> 0745 <term><guilabel>General</guilabel></term> 0746 <listitem> 0747 <variablelist> 0748 <varlistentry> 0749 <term><guilabel>Let Vi commands override Kate shortcuts</guilabel></term> 0750 <listitem> 0751 <para>When selected, Vi commands will override &kappname;'s built-in commands. For 0752 example: <keycombo action="simul">&Ctrl;<keycap>R</keycap></keycombo> will redo, 0753 and override the standard action (showing the search and replace dialog).</para> 0754 </listitem> 0755 </varlistentry> 0756 <varlistentry> 0757 <term><guilabel>Display relative line numbers 0758 </guilabel></term> 0759 <listitem><para>if this is enabled, the current line always refers to line 0. 0760 Lines above and below increase the line number relatively.</para></listitem> 0761 </varlistentry> 0762 </variablelist> 0763 </listitem> 0764 </varlistentry> 0765 <varlistentry> 0766 <term><guilabel>Key Mapping</guilabel></term> 0767 <listitem><para> 0768 Key mapping is used to change the meaning of typed keys. This allows you to 0769 move commands to other keys or make special keypresses for doing a series of 0770 commands.</para> 0771 <para>Example:</para> 0772 <para><keycap>F2</keycap> -> <userinput>I--</userinput> &Esc;</para> 0773 <para>This will prepend <userinput>I--</userinput> to a line when pressing <keycap>F2</keycap>. 0774 </para> 0775 </listitem> 0776 <!-- Normal Mode Insert Mode Visual Mode 0777 Commands Repacement Recursuive? 0778 Remove selected Add new mapping Import from vimrc file--> 0779 </varlistentry> 0780 </variablelist> 0781 0782 </sect3> 0783 0784 </sect2> 0785 0786 <sect2 id="pref-open-save"> 0787 <title>Open/Save</title> 0788 0789 <sect3 id="pref-open-save-general"> 0790 <title>General</title> 0791 0792 <variablelist> 0793 0794 <varlistentry> 0795 <term><guilabel>File Format</guilabel></term> 0796 <listitem> 0797 <variablelist> 0798 0799 <varlistentry> 0800 <term><guilabel>Encoding</guilabel></term> 0801 <listitem> 0802 <para>This defines the standard encoding to use to open/save files, if not changed 0803 in the open/save dialog or by using a command line option.</para> 0804 </listitem> 0805 </varlistentry> 0806 0807 <varlistentry> 0808 <term><guilabel>Encoding Detection</guilabel></term> 0809 <listitem> 0810 <para>Select an item from the drop down box, either to disable autodetection or 0811 use <guilabel>Universal</guilabel> to enable autodetection for all encodings. But as 0812 this may probably only detect utf-8/utf-16, selecting a region will use custom heuristics 0813 for better results. 0814 If neither the encoding chosen as standard above, nor the encoding specified 0815 in the open/save dialog, nor the encoding specified on command line match 0816 the content of the file, this detection will be run.</para> 0817 </listitem> 0818 </varlistentry> 0819 0820 <varlistentry> 0821 <term><guilabel>Fallback Encoding</guilabel></term> 0822 <listitem> 0823 <para>This defines the fallback encoding to try for opening files if neither the 0824 encoding chosen as standard above, nor the encoding specified in the open/ 0825 save dialog, nor the encoding specified on command line match the content of 0826 the file. Before this is used, an attempt will be made to determine the 0827 encoding to use by looking for a byte order mark at start of file: if one 0828 is found, the right unicode encoding will be chosen; otherwise encoding 0829 detection will run, if both fail fallback encoding will be tried.</para> 0830 </listitem> 0831 </varlistentry> 0832 0833 <varlistentry> 0834 <term><guilabel>End of line</guilabel></term> 0835 <listitem> 0836 <para>Choose your preferred end of line mode for your active 0837 document. You have the choice between &UNIX;, DOS/&Windows; or Macintosh.</para> 0838 </listitem> 0839 </varlistentry> 0840 <varlistentry> 0841 <term><guilabel>Automatic end of line detection</guilabel></term> 0842 <listitem> 0843 <para>Check this if you want the editor to autodetect the end of line 0844 type. The first found end of line type will be used for the whole file.</para> 0845 </listitem> 0846 </varlistentry> 0847 0848 <varlistentry> 0849 <term><guilabel>Enable byte order mark (BOM)</guilabel></term> 0850 <listitem> 0851 <para>The byte order mark is a special sequence at the beginning of unicode 0852 encoded documents. It helps editors to open text documents with the correct 0853 unicode encoding. For more information see <ulink 0854 url="https://en.wikipedia.org/wiki/Byte_order_mark">Byte Order Mark</ulink>.</para> 0855 </listitem> 0856 </varlistentry> 0857 0858 <varlistentry> 0859 <term><guilabel>Line Length Limit</guilabel></term> 0860 <listitem> 0861 <para>Unfortunately, due to deficiencies in &Qt;, &kappname; experiences poor 0862 performance when working with extremely long lines. For that reason, &kappname; 0863 will automatically wrap lines when they are longer than the number of characters 0864 specified here. To disable this, set this to <userinput>0</userinput>.</para> 0865 </listitem> 0866 </varlistentry> 0867 0868 </variablelist> 0869 </listitem> 0870 </varlistentry> 0871 0872 <varlistentry> 0873 <term><guilabel>Automatic Cleanups on Save</guilabel></term> 0874 <listitem> 0875 <variablelist> 0876 0877 <varlistentry> 0878 <term><guilabel>Remove trailing spaces</guilabel></term> 0879 <listitem> 0880 <para>The editor will automatically eliminate extra spaces at the ends of lines 0881 of text while saving the file. You can select <guilabel>Never</guilabel> to 0882 disable this functionality, <guilabel>On Modified Lines</guilabel> to do so 0883 only on lines that you have modified since you last saved the document, or 0884 <guilabel>In Entire Document</guilabel> to remove them unconditionally from the 0885 entire document.</para> 0886 </listitem> 0887 </varlistentry> 0888 0889 <varlistentry> 0890 <term><guilabel>Append newline at end of file on save</guilabel></term> 0891 <listitem> 0892 <para>The editor will automatically append a newline to the end of the file if 0893 one is not already present upon saving the file.</para> 0894 </listitem> 0895 </varlistentry> 0896 0897 </variablelist> 0898 </listitem> 0899 </varlistentry> 0900 0901 <varlistentry> 0902 <term><guilabel>Enable Auto Save (local files only)</guilabel></term> 0903 <listitem> 0904 <para> 0905 Check this if you want the editor to autosave documents while you are working on them. 0906 </para> 0907 <variablelist> 0908 0909 <varlistentry> 0910 <term><guilabel>Auto save document when focus leaves the editor</guilabel></term> 0911 <listitem> 0912 <para>The editor will automatically save documents when you switch to something outside the editor, ⪚, the terminal panel in &kate;.</para> 0913 </listitem> 0914 </varlistentry> 0915 0916 <varlistentry> 0917 <term><guilabel>Auto save interval</guilabel></term> 0918 <listitem> 0919 <para>You can determine the autosave interval in seconds here. If the interval is 0, the document will not be autosaved after intervals.</para> 0920 </listitem> 0921 </varlistentry> 0922 0923 </variablelist> 0924 </listitem> 0925 </varlistentry> 0926 0927 </variablelist> 0928 </sect3> 0929 0930 <sect3 id="pref-open-save-advanced"> 0931 <title>Advanced</title> 0932 <variablelist> 0933 0934 <varlistentry> 0935 <term><guilabel>Write a backup file on save for</guilabel></term> 0936 <listitem><para>Backing up on save will cause &kappname; to copy the disk file 0937 (the previously saved version of the file) to <prefix><filename><suffix> 0938 before saving the new changes. A backup file can help you recover work if 0939 something goes wrong while saving or if you later want to recover the previous 0940 version of the file. The suffix defaults to <emphasis role="bold">~</emphasis> 0941 and prefix is empty by default. </para> 0942 <variablelist> 0943 <varlistentry> 0944 <term><guilabel>Local files</guilabel></term> 0945 <listitem> 0946 <para>Check this if you want backups of local files when 0947 saving.</para> 0948 </listitem> 0949 </varlistentry> 0950 <varlistentry> 0951 <term><guilabel>Remote files</guilabel></term> 0952 <listitem> 0953 <para>Check this if you want backups of remote files when saving.</para> 0954 </listitem> 0955 </varlistentry> 0956 <varlistentry> 0957 <term><guilabel>Prefix for backup files</guilabel></term> 0958 <listitem> 0959 <para>Enter the prefix to prepend to the backup file names.</para> 0960 </listitem> 0961 </varlistentry> 0962 <varlistentry> 0963 <term><guilabel>Suffix for backup files</guilabel></term> 0964 <listitem> 0965 <para>Enter the suffix to add to the backup file names.</para> 0966 </listitem> 0967 </varlistentry> 0968 <varlistentry> 0969 <term><guilabel>Swap file mode</guilabel></term> 0970 <listitem> 0971 <para>&kappname; is able to recover (most) unsaved work in the case of a 0972 crash or power failure. A swap file (.<filename>.kate-swp) is created 0973 when a document is edited. If the user doesn’t save the 0974 changes and &kappname; crashes, the swap file remains on the disk. When opening a 0975 file, &kappname; checks if there is a swap file for the document and if it is, it asks 0976 the user whether he wants to recover the lost data or not. The user has the 0977 possibility to view the differences between the original file and the recovered 0978 one, too. The swap file is deleted after every save and on normal exit.</para> 0979 <para>&kappname; syncs the swap files on the disk every 15 seconds, but only if they 0980 have changed since the last sync. The user can disable the swap files syncing if 0981 he wants, by selecting <guilabel>Disable</guilabel>, 0982 but this can lead to more data loss.</para> 0983 <para>When the swap file is enabled, it is possible to switch between two modes, namely <guilabel>Enabled, Store in Default Directory</guilabel> and <guilabel>Enabled, Store in Custom Directory</guilabel>. 0984 </para> 0985 </listitem> 0986 </varlistentry> 0987 <varlistentry> 0988 <term><guilabel>Store swap files in</guilabel></term> 0989 <listitem><para>By default, the swap files are saved in the same folder as the file. 0990 When <guilabel>Enabled, Store in Custom Directory</guilabel> is chosen for the swap file mode, swap files are created in the specified folder. 0991 This is useful for network file systems to avoid unnecessary network traffic.</para> 0992 </listitem> 0993 </varlistentry> 0994 <varlistentry> 0995 <term><guilabel>Save swap files every</guilabel></term> 0996 <listitem><para>&kappname; syncs the swap files on the disk every 15 seconds, but only if they 0997 have changed since the last sync. You can change the sync interval as you like.</para></listitem> 0998 </varlistentry> 0999 1000 </variablelist> 1001 </listitem> 1002 </varlistentry> 1003 1004 </variablelist> 1005 </sect3> 1006 1007 <sect3 id="pref-open-save-modes-filetypes"> 1008 <title>Modes & Filetypes</title> 1009 <para>This page allows you to override the default configuration for documents 1010 of specified &MIME; types. When the editor loads a document, it will try if it 1011 matches the file masks or &MIME; types for one of the defined filetypes, and if so 1012 apply the variables defined. If more filetypes match, the one with the highest 1013 priority will be used. 1014 </para> 1015 <variablelist> 1016 <varlistentry> 1017 <term><guilabel>Filetype:</guilabel></term> 1018 <listitem><para>The filetype with the highest priority is the one displayed in 1019 the first drop down box. If more filetypes were found, they are 1020 also listed.</para> 1021 <variablelist> 1022 <varlistentry> 1023 <term><guilabel>New</guilabel></term> 1024 <listitem><para>This is used to create a new filetype. After 1025 you click on this button, the fields below get empty and you 1026 can fill the properties you want for the new filetype.</para></listitem> 1027 </varlistentry> 1028 <varlistentry> 1029 <term><guilabel>Delete</guilabel></term> 1030 <listitem><para>To remove an existing filetype, select it from the drop down 1031 box and press the Delete button.</para></listitem> 1032 </varlistentry> 1033 </variablelist> 1034 </listitem> </varlistentry> 1035 1036 <varlistentry> 1037 <term><guilabel>Properties of <replaceable>current filetype</replaceable></guilabel></term> 1038 <listitem><para>The filetype with the highest priority is the one displayed in 1039 the first drop down box. If more filetypes were found, they are also 1040 listed.</para> 1041 <variablelist> 1042 <varlistentry> 1043 <term><guilabel>Name:</guilabel></term> 1044 <listitem><para>The name of the filetype will be the text of the corresponding 1045 menu item. This name is displayed in the 1046 <menuchoice><guimenu>Tools</guimenu><guimenuitem>Filetypes</guimenuitem> 1047 </menuchoice> menu.</para></listitem> 1048 </varlistentry> 1049 <varlistentry> 1050 <term><guilabel>Section:</guilabel></term> 1051 <listitem><para>The section name is used to organize the file types in 1052 menus. This is also used in the 1053 <menuchoice><guimenu>Tools</guimenu><guimenuitem>Filetypes</guimenuitem> 1054 </menuchoice> menu.</para></listitem> 1055 </varlistentry> 1056 <varlistentry> 1057 <term><guilabel>Variables:</guilabel></term> 1058 <listitem><para>This string allows you to configure &kappname;'s settings for the 1059 files selected by this &MIME; type using &kappname; variables. You can set almost any 1060 configuration option, such as highlight, indent-mode, &etc;</para> 1061 <para>Press <guibutton>Edit</guibutton> to see a list of all available variables 1062 and their descriptions. Select the checkbox on the left to enable a particular 1063 variable and then set the value of the variable on the right. Some variables 1064 provide a drop-down box to select possible values from while others require you 1065 to enter a valid value manually.</para> 1066 <para>For complete information on these variables, see 1067 <link linkend="config-variables">Configuring with Document 1068 Variables</link>.</para> 1069 </listitem> 1070 </varlistentry> 1071 1072 <varlistentry> 1073 <term><guilabel>Highlighting:</guilabel></term> 1074 <listitem><para>If you create a new file type, this drop down box allows you to 1075 select a filetype for highlighting.</para></listitem> 1076 </varlistentry> 1077 1078 <varlistentry> 1079 <term><guilabel>Indentation Mode:</guilabel></term> 1080 <listitem><para>The drop down box specifies the indentation mode for new 1081 documents.</para></listitem> 1082 </varlistentry> 1083 1084 <varlistentry> 1085 <term><guilabel>File extensions:</guilabel></term> 1086 <listitem><para>The wildcards mask allows you to select files by filename. A 1087 typical mask uses an asterisk and the file extension, for example 1088 <filename>*.txt; *.text</filename>. The string is a semicolon-separated list of 1089 masks.</para></listitem> 1090 </varlistentry> 1091 1092 <varlistentry> 1093 <term><guilabel>MIME types:</guilabel></term> 1094 <listitem><para>Displays a wizard that helps you easily select 1095 &MIME; types.</para></listitem> 1096 </varlistentry> 1097 1098 <varlistentry> 1099 <term><guilabel>Priority:</guilabel></term> 1100 <listitem><para>Sets a priority for this file type. If more than one file type 1101 selects the same file, the one with the highest priority will be 1102 used.</para></listitem> 1103 </varlistentry> 1104 1105 </variablelist> 1106 </listitem> </varlistentry> 1107 1108 </variablelist> 1109 </sect3> 1110 1111 </sect2> 1112 1113 </sect1> 1114 1115 <sect1 id="config-variables"> 1116 <title>Configuring With Document Variables</title> 1117 1118 <para>&kappname; variables is &kappname;'s implementation of document variables, similar 1119 to &Emacs; and vi modelines. In katepart, the lines have the following format: 1120 1121 <userinput>kate: VARIABLENAME VALUE; [ VARIABLENAME VALUE; ... ]</userinput> 1122 1123 The lines can of course be in a comment, if the file is in a format with comments. 1124 Variable names are single words (no whitespace), and anything up to the next 1125 semicolon is the value. The semicolon is required.</para> 1126 1127 <para>Here is an example variable line, forcing indentation settings for a C++, 1128 &Java; or &javascript; file: 1129 1130 <programlisting>// kate: replace-tabs on; indent-width 4; indent-mode cstyle;</programlisting> 1131 </para> 1132 1133 <note><para>Only the first and last 10 lines are searched for variable lines.</para></note> 1134 1135 <para>Additionally, document variables can be placed in a file called 1136 <filename>.kateconfig</filename> in any directory, and the configured settings will 1137 be applied as if the modelines were entered on every file in the directory and its 1138 subdirectories. Document variables in <filename>.kateconfig</filename> use the same syntax as 1139 in modelines, but with <link linkend="kateconfig-extended-options">extended options</link>.</para> 1140 1141 <para>There are variables to support almost all configurations in &kappname;, and 1142 additionally plugins can use variables, in which case it should be documented in 1143 the plugin's documentation.</para> 1144 1145 <para>&kappname; has support for reading configurations from <filename>.editorconfig</filename> 1146 files, when the <ulink url="https://editorconfig.org/">editorconfig</ulink> library is installed. 1147 &kappname; automatically searches for a <filename>.editorconfig</filename> 1148 whenever you open a file. It gives priority to <filename>.kateconfig</filename> files, though. 1149 </para> 1150 1151 <sect2 id="config-variables-howto"> 1152 <title>How &kappname; uses Variables</title> 1153 1154 <para>When reading configuration, katepart looks in the following places 1155 (in that order): 1156 1157 <itemizedlist> 1158 <listitem><para>The global configuration.</para></listitem> 1159 <listitem><para>Optional session data.</para></listitem> 1160 <listitem><para>The "Filetype" configuration.</para></listitem> 1161 <listitem><para>Document variables in <filename>.kateconfig</filename>.</para></listitem> 1162 <listitem><para>Document variables in the document itself.</para></listitem> 1163 <listitem><para>Settings made during editing from menu or command line.</para></listitem> 1164 </itemizedlist> 1165 1166 As you can see, document variables are only overridden by changes made at runtime. 1167 Whenever a document is saved, the document variables are reread, and will 1168 overwrite changes made using menu items or the command line.</para> 1169 1170 <para>Any variable not listed below is stored in the document and can be queried 1171 by other objects such as plugins, which can use them for their own purpose. 1172 For example, the variable indent mode uses document variables for its 1173 configuration.</para> 1174 1175 <para>The variables listed here documents &kappname; version 5.38. More variables 1176 may be added in the future. There are 3 possible types of values for variables, 1177 with the following valid expressions: 1178 <itemizedlist> 1179 <listitem><para>BOOL - on|off|true|false|1|0</para></listitem> 1180 <listitem><para>INTEGER - any integer number</para></listitem> 1181 <listitem><para>STRING - anything else</para></listitem> 1182 </itemizedlist> 1183 </para> 1184 1185 </sect2> 1186 1187 <sect2 id="config-variables-list"> 1188 <title>Available Variables</title> 1189 1190 <variablelist> 1191 1192 <varlistentry id="variable-auto-brackets"> 1193 <term><cmdsynopsis><command>auto-brackets</command><arg>BOOL</arg></cmdsynopsis></term> 1194 <listitem><para>Enable automatic insertion of brackets.</para></listitem> 1195 </varlistentry> 1196 1197 <varlistentry id="variable-auto-center-lines"> 1198 <term><cmdsynopsis><command>auto-center-lines</command><arg>INT</arg></cmdsynopsis></term> 1199 <listitem><para>Set the number of autocenter lines.</para></listitem> 1200 </varlistentry> 1201 1202 <varlistentry id="variable-background-color"> 1203 <term><cmdsynopsis><command>background-color</command><arg>STRING</arg></cmdsynopsis></term> 1204 <listitem><para>Set the document background color. The value must be something 1205 that can be evaluated to a valid color, for example <userinput>#ff0000</userinput>. 1206 </para></listitem> 1207 </varlistentry> 1208 1209 <varlistentry id="variable-backspace-indents"> 1210 <term><cmdsynopsis><command>backspace-indents</command><arg>BOOL</arg></cmdsynopsis></term> 1211 <listitem><para>Enable or disable unindenting when &Backspace; is pressed.</para></listitem> 1212 </varlistentry> 1213 1214 <varlistentry id="variable-block-selection"> 1215 <term><cmdsynopsis><command>block-selection</command><arg>BOOL</arg></cmdsynopsis></term> 1216 <listitem><para>Turn <link linkend="kate-part-selection-block">block selection</link> 1217 on or off.</para></listitem> 1218 </varlistentry> 1219 1220 <varlistentry id="variable-byte-order-mark"> 1221 <term><cmdsynopsis><command>bom | byte-order-mark | byte-order-marker</command><arg>BOOL</arg></cmdsynopsis></term> 1222 <listitem><para>Enable/disable the byte order mark (BOM) when saving files in Unicode format 1223 (utf8, utf16, utf32).</para> 1224 <para>Since: &kate; 3.4 (&kde; 4.4)</para></listitem> 1225 </varlistentry> 1226 1227 <varlistentry id="variable-bracket-highlight-color"> 1228 <term><cmdsynopsis><command>bracket-highlight-color</command><arg>STRING</arg></cmdsynopsis></term> 1229 <listitem><para>Set the color for the bracket highlight. The value must be 1230 something that can be evaluated to a valid color, for example <userinput>#ff0000</userinput>. 1231 </para></listitem> 1232 </varlistentry> 1233 1234 <varlistentry id="variable-current-line-color"> 1235 <term><cmdsynopsis><command>current-line-color</command><arg>STRING</arg></cmdsynopsis></term> 1236 <listitem><para>Set the color for the current line. The value must be 1237 something that can be evaluated to a valid color, for example <userinput>#ff0000</userinput>. 1238 </para></listitem> 1239 </varlistentry> 1240 1241 <varlistentry id="variable-default-dictionary"> 1242 <term><cmdsynopsis><command>default-dictionary</command><arg>STRING</arg></cmdsynopsis></term> 1243 <listitem><para>Sets the default dictionary used for spellchecking.</para> 1244 <para>Since: &kate; 3.4 (&kde; 4.4)</para></listitem> 1245 </varlistentry> 1246 1247 <varlistentry id="variable-dynamic-word-wrap"> 1248 <term><cmdsynopsis><command>dynamic-word-wrap</command><arg>BOOL</arg></cmdsynopsis></term> 1249 <listitem><para>Turns <link linkend="kate-part-auto-wrap">dynamic word wrap</link> on or 1250 off.</para></listitem> 1251 </varlistentry> 1252 1253 <varlistentry id="variable-end-of-line"> 1254 <term><cmdsynopsis><command>eol | end-of-line</command><arg>STRING</arg></cmdsynopsis></term> 1255 <listitem><para>Set the end of line mode. Valid settings are 1256 <userinput>unix</userinput>, <userinput>mac</userinput> and <userinput>dos</userinput>.</para></listitem> 1257 </varlistentry> 1258 1259 <varlistentry id="variable-folding-markers"> 1260 <term><cmdsynopsis><command>folding-markers</command><arg>BOOL</arg></cmdsynopsis></term> 1261 <listitem><para>Set the display of 1262 <link linkend="advanced-editing-tools-code-folding">folding markers</link> 1263 on or off. 1264 </para></listitem> 1265 </varlistentry> 1266 1267 <varlistentry id="variable-folding-preview"> 1268 <term><cmdsynopsis><command>folding-preview</command><arg>BOOL</arg></cmdsynopsis></term> 1269 <listitem><para>Enable folding preview in the editor border.</para></listitem> 1270 </varlistentry> 1271 1272 <varlistentry id="variable-font-size"> 1273 <term><cmdsynopsis><command>font-size</command><arg>INT</arg></cmdsynopsis></term> 1274 <listitem><para>Set the point size of the document font.</para></listitem> 1275 </varlistentry> 1276 1277 <varlistentry id="variable-font"> 1278 <term><cmdsynopsis><command>font</command><arg>STRING</arg></cmdsynopsis></term> 1279 <listitem><para>Set the font of the document. The value should be a valid font 1280 name, for example <userinput>courier</userinput>.</para></listitem> 1281 </varlistentry> 1282 1283 <varlistentry id="variable-syntax"> 1284 <term><cmdsynopsis><command>hl | syntax</command><arg>STRING</arg></cmdsynopsis></term> 1285 <listitem><para>Set the syntax highlighting. Valid strings are all the names available 1286 in the menus. For instance, for C++ simply write <userinput>C++</userinput>.</para></listitem> 1287 </varlistentry> 1288 1289 <varlistentry id="variable-icon-bar-color"> 1290 <term><cmdsynopsis><command>icon-bar-color</command><arg>STRING</arg></cmdsynopsis></term> 1291 <listitem><para>Set the icon bar color. The value must be something that can 1292 be evaluated to a valid color, for example <userinput>#ff0000</userinput>.</para></listitem> 1293 </varlistentry> 1294 1295 <varlistentry id="variable-icon-border"> 1296 <term><cmdsynopsis><command>icon-border</command><arg>BOOL</arg></cmdsynopsis></term> 1297 <listitem><para>Set the display of the icon border on or off.</para></listitem> 1298 </varlistentry> 1299 1300 <varlistentry id="variable-indent-mode"> 1301 <term><cmdsynopsis><command>indent-mode</command><arg>STRING</arg></cmdsynopsis></term> 1302 <listitem><para>Set the auto-indentation mode. The options <userinput>none</userinput>, 1303 <userinput>normal</userinput>, <userinput>cstyle</userinput>, <userinput>haskell</userinput>, 1304 <userinput>lilypond</userinput>, <userinput>lisp</userinput>, <userinput>python</userinput>, 1305 <userinput>ruby</userinput> and <userinput>xml</userinput> are recognized. See the section 1306 <xref linkend="kate-part-autoindent"/> for details.</para></listitem> 1307 </varlistentry> 1308 1309 <varlistentry id="variable-indent-pasted-text"> 1310 <term><cmdsynopsis><command>indent-pasted-text</command><arg>BOOL</arg></cmdsynopsis></term> 1311 <listitem><para>Enable/disable adjusting indentation of text pasted from the clipboard.</para> 1312 <para>Since: &kate; 3.11 (&kde; 4.11)</para></listitem> 1313 </varlistentry> 1314 1315 <varlistentry id="variable-indent-width"> 1316 <term><cmdsynopsis><command>indent-width</command><arg>INT</arg></cmdsynopsis></term> 1317 <listitem><para>Set the indentation width.</para></listitem> 1318 </varlistentry> 1319 1320 <varlistentry id="variable-keep-extra-spaces"> 1321 <term><cmdsynopsis><command>keep-extra-spaces</command><arg>BOOL</arg></cmdsynopsis></term> 1322 <listitem><para>Set whether to keep extra spaces when calculating indentation width.</para></listitem> 1323 </varlistentry> 1324 1325 <varlistentry id="variable-line-numbers"> 1326 <term><cmdsynopsis><command>line-numbers</command><arg>BOOL</arg></cmdsynopsis></term> 1327 <listitem><para>Set the display of line numbers on or off.</para></listitem> 1328 </varlistentry> 1329 1330 <varlistentry id="variable-newline-at-eof"> 1331 <term><cmdsynopsis><command>newline-at-eof</command><arg>BOOL</arg></cmdsynopsis></term> 1332 <listitem><para>Add an empty line at the end of the file (EOF) when saving the document.</para> 1333 <para>Since: &kate; 3.9 (&kde; 4.9)</para></listitem> 1334 </varlistentry> 1335 1336 <varlistentry id="variable-overwrite-mode"> 1337 <term><cmdsynopsis><command>overwrite-mode</command><arg>BOOL</arg></cmdsynopsis></term> 1338 <listitem><para>Set overwrite mode on or off.</para></listitem> 1339 </varlistentry> 1340 1341 <varlistentry id="variable-persistent-selection"> 1342 <term><cmdsynopsis><command>persistent-selection</command><arg>BOOL</arg></cmdsynopsis></term> 1343 <listitem><para>Set <link linkend="kate-part-selection-persistent">persistent selection</link> 1344 on or off.</para></listitem> 1345 </varlistentry> 1346 1347 <varlistentry id="variable-replace-tabs-save"> 1348 <term><cmdsynopsis><command>replace-tabs-save</command><arg>BOOL</arg></cmdsynopsis></term> 1349 <listitem><para>Set tab to space conversion on save on or off.</para></listitem> 1350 </varlistentry> 1351 1352 <varlistentry id="variable-replace-tabs"> 1353 <term><cmdsynopsis><command>replace-tabs</command><arg>BOOL</arg></cmdsynopsis></term> 1354 <listitem><para>Set dynamic tab to space conversion on or off.</para></listitem> 1355 </varlistentry> 1356 1357 <varlistentry id="variable-remove-trailing-spaces"> 1358 <term><cmdsynopsis><command>remove-trailing-spaces</command><arg>STRING</arg></cmdsynopsis></term> 1359 <listitem><para>Removes trailing spaces when saving the document. Valid options are:</para> 1360 <itemizedlist> 1361 <listitem><para><userinput>none</userinput>, <userinput>-</userinput> or <userinput>0</userinput>: never remove trailing spaces.</para></listitem> 1362 <listitem><para><userinput>modified</userinput>, <userinput>mod</userinput>, <userinput>+</userinput> or <userinput>1</userinput>: remove trailing spaces only in 1363 modified lines. The modified lines are marked by the line modification system.</para></listitem> 1364 <listitem><para><userinput>all</userinput>, <userinput>*</userinput> or <userinput>2</userinput>: remove trailing spaces in the entire document.</para></listitem> 1365 </itemizedlist> 1366 </listitem> 1367 </varlistentry> 1368 1369 <varlistentry id="variable-scrollbar-minimap"> 1370 <term><cmdsynopsis><command>scrollbar-minimap</command><arg>BOOL</arg></cmdsynopsis></term> 1371 <listitem><para>Show scrollbar minimap.</para></listitem> 1372 </varlistentry> 1373 1374 <varlistentry id="variable-scrollbar-preview"> 1375 <term><cmdsynopsis><command>scrollbar-preview</command><arg>BOOL</arg></cmdsynopsis></term> 1376 <listitem><para>Show scrollbar preview.</para></listitem> 1377 </varlistentry> 1378 1379 <varlistentry id="variable-scheme"> 1380 <term><cmdsynopsis><command>scheme</command><arg>STRING</arg></cmdsynopsis></term> 1381 <listitem><para>Set the color scheme. The string must be the name of a color 1382 scheme that exists in your configuration to have any effect.</para></listitem> 1383 </varlistentry> 1384 1385 <varlistentry id="variable-selection-color"> 1386 <term><cmdsynopsis><command>selection-color</command><arg>STRING</arg></cmdsynopsis></term> 1387 <listitem><para>Set the selection color. The value must be something that can 1388 be evaluated to a valid color, for example <userinput>#ff0000</userinput>.</para></listitem> 1389 </varlistentry> 1390 1391 <varlistentry id="variable-show-tabs"> 1392 <term><cmdsynopsis><command>show-tabs</command><arg>BOOL</arg></cmdsynopsis></term> 1393 <listitem><para>Set the visual tab character on or off.</para></listitem> 1394 </varlistentry> 1395 1396 <varlistentry id="variable-smart-home"> 1397 <term><cmdsynopsis><command>smart-home</command><arg>BOOL</arg></cmdsynopsis></term> 1398 <listitem><para>Set <link linkend="pref-edit-cursor-selection">smart home navigation</link> 1399 on or off.</para></listitem> 1400 </varlistentry> 1401 1402 <varlistentry id="variable-tab-indents"> 1403 <term><cmdsynopsis><command>tab-indents</command><arg>BOOL</arg></cmdsynopsis></term> 1404 <listitem><para>Set 	 key indentation on or off.</para></listitem> 1405 </varlistentry> 1406 1407 <varlistentry id="variable-tab-width"> 1408 <term><cmdsynopsis><command>tab-width</command><arg>INT</arg></cmdsynopsis></term> 1409 <listitem><para>Set the tab character display width.</para></listitem> 1410 </varlistentry> 1411 1412 <varlistentry id="variable-undo-steps"> 1413 <term><cmdsynopsis><command>undo-steps</command><arg>INT</arg></cmdsynopsis></term> 1414 <listitem><para>Set the number of undo steps to remember.</para> 1415 <para>Note: Deprecated since &kate; 3 in &kde;4. This variable is ignored. The maximal count of undo steps is unlimited.</para></listitem> 1416 </varlistentry> 1417 1418 <varlistentry id="variable-word-wrap-column"> 1419 <term><cmdsynopsis><command>word-wrap-column</command><arg>INT</arg></cmdsynopsis></term> 1420 <listitem><para>Set the <link linkend="kate-part-auto-wrap">static word wrap</link> 1421 width. </para></listitem> 1422 </varlistentry> 1423 1424 <varlistentry id="variable-word-wrap-marker-color"> 1425 <term><cmdsynopsis><command>word-wrap-marker-color</command><arg>STRING</arg></cmdsynopsis></term> 1426 <listitem><para>Set the word wrap marker color. The value must be something 1427 that can be evaluated to a valid color, for example <userinput>#ff0000</userinput>.</para></listitem> 1428 </varlistentry> 1429 1430 <varlistentry id="variable-word-wrap"> 1431 <term><cmdsynopsis><command>word-wrap</command><arg>BOOL</arg></cmdsynopsis></term> 1432 <listitem><para>Set static word wrapping on or off.</para></listitem> 1433 </varlistentry> 1434 1435 </variablelist> 1436 1437 </sect2> 1438 1439 <sect2 id="kateconfig-extended-options"> 1440 <title>Extended Options in <filename>.kateconfig</filename> files</title> 1441 1442 <para>&kappname; always search for a <filename>.kateconfig</filename> file for local files (not remote files). 1443 In addition, it is possible to set options based on wildcards (file extensions) as follows:</para> 1444 1445 <programlisting>kate: tab-width 4; indent-width 4; replace-tabs on; 1446 kate-wildcard(*.xml): indent-width 2; 1447 kate-wildcard(Makefile): replace-tabs off; 1448 </programlisting> 1449 1450 <para>In this example, all files use a tab-width of 4 spaces, an indent-width of 4 spaces, 1451 and tabs are replaced expanded to spaces. However, for all <filename class="extension">*.xml</filename> 1452 files, the indent width is set to 2 spaces. 1453 And Makefiles use tabs, &ie; tabs are not replaced with spaces.</para> 1454 1455 <para>Wildcards are semicolon separated, &ie; you can also specify multiple file extensions as follows: 1456 </para> 1457 1458 <programlisting>kate-wildcard(*.json;*.xml): indent-width 2;</programlisting> 1459 1460 <para>Further, you can also use the &MIME; type to match certain files, ⪚ to indent 1461 all C++ source files with 4 spaces, you can write: 1462 </para> 1463 1464 <programlisting>kate-mimetype(text/x-c++src): indent-width 4;</programlisting> 1465 1466 <note><para>Next to the support in <filename>.kateconfig</filename> files, wildcard and &MIME; type 1467 dependent document variables are also supported in the files itself as comments. 1468 </para></note> 1469 1470 </sect2> 1471 1472 </sect1> 1473 1474 </chapter>