1077
1077
<para>The editor will search the given number of folder levels upwards
1078
1078
for &kappname; config file and load the settings line from it.
1079
Further information about these hidden folder config files you find in the article
1080
<ulink url="http://kate-editor.org/article/.kateconfig">The File .kateconfig</ulink>.
1079
Further information about these hidden folder config files you find in the
1080
<link linkend="config-variables">document variables section</link>.
1083
1083
</varlistentry>
1349
1349
<title>Configuring With Document Variables</title>
1351
<para>Kate variables is kateparts implementation of document variables, similar
1352
to emacs and vi modelines. In katepart, the lines have the format
1351
<para>&kate; variables is katepart's implementation of document variables, similar
1352
to emacs and vi modelines. In katepart, the lines have the following format:
1354
1354
<userinput>kate: VARIABLENAME VALUE; [ VARIABLENAME VALUE; ... ]</userinput>
1356
the lines can of course be in a comment, if the file is in a format with comments.
1356
The lines can of course be in a comment, if the file is in a format with comments.
1357
1357
Variable names are single words (no whitespace), and anything up to the next
1358
1358
semicolon is the value. The semicolon is required.</para>
1366
1366
<note><para>Only the first and last 10 lines are searched for variable lines.</para></note>
1368
<para>Additionally, document variables can be placed in a file called
1369
<filename>.kateconfig</filename> in any directory, and the configured settings will
1370
be applied as if the modelines were entered on every file in the directory and its
1371
subdirectories, as far down as the
1372
<link linkend="pref-open-save-advanced">configured search depth.</link>
1373
Document variables in <filename>.kateconfig</filename> use the same syntax as
1374
in modelines.</para>
1368
1376
<para>There are variables to support almost all configurations in katepart, and
1369
1377
additionally plugins can use variables, in which case it should be documented in
1370
1378
the plugin's documentation.</para>
1379
1387
<listitem><para>The global configuration.</para></listitem>
1380
1388
<listitem><para>Optional session data.</para></listitem>
1381
1389
<listitem><para>The "Filetype" configuration.</para></listitem>
1390
<listitem><para>Document variables in <filename>.kateconfig</filename>.</para></listitem>
1382
1391
<listitem><para>Document variables in the document itself.</para></listitem>
1383
1392
<listitem><para>Settings made during editing from menu or command line.</para></listitem>
1384
1393
</itemizedlist>
1386
As you can understand document variables has the next highest precedence.
1395
As you see, document variables are only overriden by changes made at runtime.
1387
1396
Whenever a document is saved, the document variables are reread, and will
1388
1397
overwrite changes made using menu items or the command line.</para>
1390
1399
<para>Any variable not listed below is stored in the document and can be queried
1391
1400
by other objects such as plugins, which can use them for their own purpose.
1392
For example the variable indent mode uses document variables for its
1401
For example, the variable indent mode uses document variables for its
1393
1402
configuration.</para>
1395
<para>The variables listed here documents &kate; version 2.4. More variables
1404
<para>The variables listed here documents &kate; version 3.7. More variables
1396
1405
may be added in the future. There are 3 possible types of values for variables,
1397
1406
with the following valid expressions:
1418
1427
<varlistentry id="variable-auto-insert-doxygen">
1419
1428
<term><cmdsynopsis><command>auto-insert-doxygen</command><arg>BOOL</arg></cmdsynopsis></term>
1420
1429
<listitem><para>Turn insertion of the leading asterisk in doxygen comments on or
1421
off. This has no effect unless you use the cstyle auto-indenter. </para></listitem>
1430
off. This has no effect unless you use the C-style auto-indenter. </para></listitem>
1422
1431
</varlistentry>
1424
1433
<varlistentry id="variable-background-color">
1425
1434
<term><cmdsynopsis><command>background-color</command><arg>STRING</arg></cmdsynopsis></term>
1426
1435
<listitem><para>Set the document background color. The value must be something
1427
that can be evaluated to a valid color, for example "#ff0000".</para></listitem>
1436
that can be evaluated to a valid color, for example <userinput>#ff0000</userinput>.
1428
1438
</varlistentry>
1430
1440
<varlistentry id="variable-backspace-indents">
1431
1441
<term><cmdsynopsis><command>backspace-indents</command><arg>BOOL</arg></cmdsynopsis></term>
1432
<listitem><para>Turn backspace indenting on or off.</para></listitem>
1442
<listitem><para>Enable or disable unindenting when &Backspace; is pressed.</para></listitem>
1433
1443
</varlistentry>
1435
1445
<varlistentry id="variable-block-selection">
1436
1446
<term><cmdsynopsis><command>block-selection</command><arg>BOOL</arg></cmdsynopsis></term>
1437
<listitem><para>Turn block selection on or off.</para></listitem>
1447
<listitem><para>Turn <link linkend="kate-part-selection-block">block selection</link>
1448
on or off.</para></listitem>
1438
1449
</varlistentry>
1440
1451
<varlistentry id="variable-byte-order-marker">
1441
1452
<term><cmdsynopsis><command>bom | byte-order-marker</command><arg>BOOL</arg></cmdsynopsis></term>
1442
<listitem><para>Enable/disable the byte order marker when saving files in unicode format (utf8, utf16, utf32).</para>
1453
<listitem><para>Enable/disable the byte order marker when saving files in unicode format
1454
(utf8, utf16, utf32).</para>
1443
1455
<para>Since: Kate 3.4 (KDE 4.4)</para></listitem>
1444
1456
</varlistentry>
1446
1458
<varlistentry id="variable-bracket-highlight-color">
1447
1459
<term><cmdsynopsis><command>bracket-highlight-color</command><arg>STRING</arg></cmdsynopsis></term>
1448
1460
<listitem><para>Set the color for the bracket highlight. The value must be
1449
something that can be evaluated to a valid color, for example "#ff0000" </para></listitem>
1461
something that can be evaluated to a valid color, for example <userinput>#ff0000</userinput>.
1450
1463
</varlistentry>
1452
1465
<varlistentry id="variable-current-line-color">
1453
1466
<term><cmdsynopsis><command>current-line-color</command><arg>STRING</arg></cmdsynopsis></term>
1454
1467
<listitem><para>Set the color for the current line. The value must be
1455
something that can be evaluated to a valid color, for example "#ff0000".</para></listitem>
1468
something that can be evaluated to a valid color, for example <userinput>#ff0000</userinput>
1456
1470
</varlistentry>
1458
1472
<varlistentry id="variable-default-dictionary">
1464
1478
<varlistentry id="variable-dynamic-word-wrap">
1465
1479
<term><cmdsynopsis><command>dynamic-word-wrap</command><arg>BOOL</arg></cmdsynopsis></term>
1466
<listitem><para>Turns dynamic word wrap on or off.</para></listitem>
1480
<listitem><para>Turns <link linkend="kate-part-auto-wrap">dynamic word wrap</link> on or
1481
off.</para></listitem>
1467
1482
</varlistentry>
1469
1484
<varlistentry id="variable-end-of-line">
1470
1485
<term><cmdsynopsis><command>eol | end-of-line</command><arg>STRING</arg></cmdsynopsis></term>
1471
1486
<listitem><para>Set the end of line mode. Valid settings are
1472
<quote>unix</quote>, <quote>mac</quote> and <quote>dos</quote></para></listitem>
1487
<userinput>unix</userinput>, <userinput>mac</userinput> and <userinput>dos</userinput></para></listitem>
1473
1488
</varlistentry>
1475
1490
<varlistentry id="variable-folding-markers">
1476
1491
<term><cmdsynopsis><command>folding-markers</command><arg>BOOL</arg></cmdsynopsis></term>
1477
<listitem><para>Set the display of folding markers on or off.</para></listitem>
1492
<listitem><para>Set the display of
1493
<link linkend="advanced-editing-tools-code-folding">folding markers</link> on or off.
1478
1495
</varlistentry>
1480
1497
<varlistentry id="variable-font-size">
1485
1502
<varlistentry id="variable-font">
1486
1503
<term><cmdsynopsis><command>font</command><arg>STRING</arg></cmdsynopsis></term>
1487
1504
<listitem><para>Set the font of the document. The value should be a valid font
1488
name, for example <quote>courier</quote>.</para></listitem>
1505
name, for example <userinput>courier</userinput>.</para></listitem>
1489
1506
</varlistentry>
1491
1508
<varlistentry id="variable-syntax">
1492
1509
<term><cmdsynopsis><command>hl | syntax</command><arg>STRING</arg></cmdsynopsis></term>
1493
<listitem><para>Set the syntax highlighting. Valid strings are all the names available in the menus. For instance, for C++ simply write <literal>C++</literal>.</para></listitem>
1510
<listitem><para>Set the syntax highlighting. Valid strings are all the names available
1511
in the menus. For instance, for C++ simply write <userinput>C++</userinput>.</para></listitem>
1494
1512
</varlistentry>
1496
1514
<varlistentry id="variable-icon-bar-color">
1497
1515
<term><cmdsynopsis><command>icon-bar-color</command><arg>STRING</arg></cmdsynopsis></term>
1498
1516
<listitem><para>Set the icon bar color. The value must be something that can
1499
be evaluated to a valid color, for example <literal>#ff0000</literal>.</para></listitem>
1517
be evaluated to a valid color, for example <userinput>#ff0000</userinput>.</para></listitem>
1500
1518
</varlistentry>
1502
1520
<varlistentry id="variable-icon-border">
1507
1525
<varlistentry id="variable-indent-mode">
1508
1526
<term><cmdsynopsis><command>indent-mode</command><arg>STRING</arg></cmdsynopsis></term>
1509
<listitem><para>Set the auto-indentation mode. The options <quote>none</quote>,
1510
<quote>normal</quote>, <quote>cstyle</quote>, <quote>haskell</quote>,
1511
<quote>lilypond</quote>, <quote>lisp</quote>, <quote>python</quote>,
1512
<quote>ruby</quote> and <quote>xml</quote> are recognized. See the section
1527
<listitem><para>Set the auto-indentation mode. The options <userinput>none</userinput>,
1528
<userinput>normal</userinput>, <userinput>cstyle</userinput>, <userinput>haskell</userinput>,
1529
<userinput>lilypond</userinput>, <userinput>lisp</userinput>, <userinput>python</userinput>,
1530
<userinput>ruby</userinput> and <userinput>xml</userinput> are recognized. See the section
1513
1531
<xref linkend="kate-part-autoindent"/> for details.</para></listitem>
1514
1532
</varlistentry>
1542
1560
<varlistentry id="variable-persistent-selection">
1543
1561
<term><cmdsynopsis><command>persistent-selection</command><arg>BOOL</arg></cmdsynopsis></term>
1544
<listitem><para>Set persistent selection on or off.</para></listitem>
1562
<listitem><para>Set <link linkend="kate-part-selection-persistent">persistent selection</link>
1563
on or off.</para></listitem>
1545
1564
</varlistentry>
1547
1566
<varlistentry id="variable-remove-trailing-space">
1552
1571
<varlistentry id="variable-replace-tabs-save">
1553
1572
<term><cmdsynopsis><command>replace-tabs-save</command><arg>BOOL</arg></cmdsynopsis></term>
1554
<listitem><para>Set tab->space conversion on save on or off.</para></listitem>
1573
<listitem><para>Set tab to space conversion on save on or off.</para></listitem>
1555
1574
</varlistentry>
1557
1576
<varlistentry id="variable-replace-tabs">
1558
1577
<term><cmdsynopsis><command>replace-tabs</command><arg>BOOL</arg></cmdsynopsis></term>
1559
<listitem><para>Set dynamic tab->space conversion on or off.</para></listitem>
1578
<listitem><para>Set dynamic tab to space conversion on or off.</para></listitem>
1560
1579
</varlistentry>
1562
1581
<varlistentry id="variable-replace-trailing-space-save">
1573
1592
<varlistentry id="variable-selection-color">
1574
1593
<term><cmdsynopsis><command>selection-color</command><arg>STRING</arg></cmdsynopsis></term>
1575
1594
<listitem><para>Set the selection color. The value must be something that can
1576
be evaluated to a valid color, for example "#ff0000".</para></listitem>
1595
be evaluated to a valid color, for example <userinput>#ff0000</userinput>.</para></listitem>
1577
1596
</varlistentry>
1579
1598
<varlistentry id="variable-show-tabs">
1580
1599
<term><cmdsynopsis><command>show-tabs</command><arg>BOOL</arg></cmdsynopsis></term>
1581
<listitem><para>Set the visual TAB character on or off.</para></listitem>
1600
<listitem><para>Set the visual 	 character on or off.</para></listitem>
1582
1601
</varlistentry>
1584
1603
<varlistentry id="variable-smart-home">
1585
1604
<term><cmdsynopsis><command>smart-home</command><arg>BOOL</arg></cmdsynopsis></term>
1586
<listitem><para>Set smart home navigation on or off.</para></listitem>
1605
<listitem><para>Set <link linkend="pref-edit-cursor-selection">smart home navigation</link>
1606
on or off.</para></listitem>
1587
1607
</varlistentry>
1589
1609
<varlistentry id="variable-space-indent">
1590
1610
<term><cmdsynopsis><command>space-indent</command><arg>BOOL</arg></cmdsynopsis></term>
1591
1611
<listitem><para>Set indentation with spaces on or off.</para>
1592
<para>Note: Deprecated since Kate 3 in KDE4. Mixed indentation is the default behavior. Set <command>replace-tabs on;</command> to achieve space-only indentation.</para></listitem>
1612
<para>Note: Deprecated since Kate 3 in KDE4. Mixed indentation is the default behavior.
1613
Set <command>replace-tabs on;</command> to achieve space-only indentation.</para></listitem>
1593
1614
</varlistentry>
1595
1616
<varlistentry id="variable-tab-indents">
1596
1617
<term><cmdsynopsis><command>tab-indents</command><arg>BOOL</arg></cmdsynopsis></term>
1597
<listitem><para>Set the TAB key indentation on or off.</para></listitem>
1618
<listitem><para>Set 	 key indentation on or off.</para></listitem>
1598
1619
</varlistentry>
1600
1621
<varlistentry id="variable-tab-width">
1601
1622
<term><cmdsynopsis><command>tab-width</command><arg>INT</arg></cmdsynopsis></term>
1602
<listitem><para>Set the tab display width.</para></listitem>
1623
<listitem><para>Set the tab character display width.</para></listitem>
1603
1624
</varlistentry>
1605
1626
<varlistentry id="variable-undo-steps">
1611
1632
<varlistentry id="variable-word-wrap-column">
1612
1633
<term><cmdsynopsis><command>word-wrap-column</command><arg>INT</arg></cmdsynopsis></term>
1613
<listitem><para>Set the hard word wrap width.</para></listitem>
1634
<listitem><para>Set the <link linkend="kate-part-auto-wrap">static word wrap</link>
1635
width. </para></listitem>
1614
1636
</varlistentry>
1616
1638
<varlistentry id="variable-word-wrap-marker-color">
1617
1639
<term><cmdsynopsis><command>word-wrap-marker-color</command><arg>STRING</arg></cmdsynopsis></term>
1618
<listitem><para>Set the word wrap marker color. The value must be something
1619
that can be evaluated to a valid color, for example "#ff0000".</para></listitem>
1640
<listitem><para>Set the word wrap marker color. The value must be something
1641
that can be evaluated to a valid color, for example <userinput>#ff0000</userinput>.</para></listitem>
1620
1642
</varlistentry>
1622
1644
<varlistentry id="variable-word-wrap">
1623
1645
<term><cmdsynopsis><command>word-wrap</command><arg>BOOL</arg></cmdsynopsis></term>
1624
<listitem><para>Set hard word wrapping on or off.</para></listitem>
1646
<listitem><para>Set static word wrapping on or off.</para></listitem>
1625
1647
</varlistentry>
1627
1649
<varlistentry id="variable-wrap-cursor">