54
54
<term><guilabel>Data Tools</guilabel></term>
55
<listitem><para>Enables data tools like thesaurus and spell check (if installed).
56
Data tools are only available when text is selected, or when the right mouse
57
button is clicked over a word. If no data tools are offered even when text
58
is selected, you need to install them. Some data tools are part of the
55
<listitem><para>Enables data tools like thesaurus and spell check (if installed).
56
Data tools are only available when text is selected, or when the right mouse
57
button is clicked over a word. If no data tools are offered even when text
58
is selected, you need to install them. Some data tools are part of the
60
If this plugin is enabled and data tools are installed, additional items
60
If this plugin is enabled and data tools are installed, additional items
61
61
appear at the end of the context menu.</para></listitem>
64
64
<term><link linkend="kate-editor-plugin-exporter"><guilabel>Exporter</guilabel></link></term>
65
<listitem><para>This command allows you to export the current document with all highlighting
66
information into a HTML document using <menuchoice><guimenu>File</guimenu><guimenuitem>Export
65
<listitem><para>This command allows you to export the current document with all highlighting
66
information into a HTML document using <menuchoice><guimenu>File</guimenu><guimenuitem>Export
67
67
as HTML</guimenuitem></menuchoice>. Additionally you can use <menuchoice><guimenu>Edit</guimenu>
68
<guimenuitem>Copy as HTML</guimenuitem></menuchoice> to copy the currently selected text
68
<guimenuitem>Copy as HTML</guimenuitem></menuchoice> to copy the currently selected text
69
69
as HTML to the system clipboard.</para></listitem>
72
72
<term><guilabel>IconInserter</guilabel></term>
73
<listitem><para>The icon inserter plugin is only of use for &kde; developers: It adds an item
74
<guimenuitem>Insert KIcon-Code</guimenuitem> into the context menu of the editor.
75
If activated, the &kde;'s icon chooser opens (showing application icons, action icons &etc;..).
76
If you click on it, the file name without file extension will be inserted as
73
<listitem><para>The icon inserter plugin is only of use for &kde; developers: It adds an item
74
<guimenuitem>Insert KIcon-Code</guimenuitem> into the context menu of the editor.
75
If activated, the &kde;'s icon chooser opens (showing application icons, action icons &etc;..).
76
If you click on it, the file name without file extension will be inserted as
77
77
text. Useful only for setting icons via &kde;'s framework through the KIcon() class.
836
<sect1 id="kate-application-plugin-findinfiles">
838
<authorgroup><author>
839
<firstname>T.C.</firstname>
840
<surname>Hollingsworth</surname>
841
<affiliation><address>tchollingsworth@gmail.com</address></affiliation>
842
</author></authorgroup>
844
<title>Find in Files</title>
846
<sect2 id="findinfiles-menu">
847
<title>Menu Structure</title>
853
<guimenu>Edit</guimenu>
854
<guimenuitem>Find in Files...</guimenuitem>
858
<para>Launch the <guilabel>Find in Files</guilabel> dialog to allow you to
859
search for text in the files of a folder.</para>
866
<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
867
<guimenuitem>Show Find in Files</guimenuitem>
871
<para>Toggle the display of &kate;'s <guilabel>Find in Files</guilabel> tool.
880
824
<sect1 id="kate-application-plugin-searchinfiles">
882
826
<authorgroup><author>
883
<firstname>T.C.</firstname>
884
<surname>Hollingsworth</surname>
885
<affiliation><address><email>tchollingsworth@gmail.com</email></address></affiliation>
827
&TC.Hollingsworth; &TC.Hollingsworth.mail;
886
828
</author></authorgroup>
888
<title>Search in Files</title>
830
<title>Search and Replace</title>
890
832
<sect2 id="searchinfiles-intro">
891
833
<title>Introduction</title>
1429
<sect1 id="kate-application-plugin-snippets">
1432
<author><firstname>Martin</firstname> <surname>Gergov</surname></author>
1433
<author>&TC.Hollingsworth; &TC.Hollingsworth.mail;</author>
1436
<title>Kate Snippets</title>
1438
<sect2 id="snippets-intro">
1439
<title>Introduction</title>
1440
<para>Kate Snippets is a plugin used to save you some time by adding support for
1441
so-called "snippets" (re-usable source code, machine code or text). The plugin
1442
also supports code completion and QtScript.</para>
1445
<sect2 id="snippets-menu">
1446
<title>Menu Structure</title>
1450
<term><menuchoice><guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
1451
<guimenuitem>Show Kate Snippets</guimenuitem></menuchoice></term>
1452
<listitem><para>Shows snippets panel containing all snippets in your repository
1453
that are for the currently opened file type.</para></listitem>
1459
<sect2 id="snippets-config">
1460
<title>Configuration</title>
1462
<para>The configuration for Kate Snippets can be accessed in <menuchoice>
1463
<guimenu>Settings</guimenu><guimenuitem>Configure Kate</guimenuitem></menuchoice>,
1464
in <guilabel>Kate Snippets</guilabel> under <guilabel>Application</guilabel>.</para>
1466
<screenshot id="screenshot-snippets-config">
1467
<screeninfo>Kate Snippets Configuration</screeninfo>
1469
<imageobject><imagedata fileref="snippets-config.png" format="PNG"/></imageobject>
1470
<textobject><phrase>The Kate snippets configuration panel.</phrase></textobject>
1471
<caption><para>The configuration panel for Kate Snippets.</para></caption>
1475
<para>In the configuration panel you should see a list of snippet repositories,
1476
along with options to create your own, get them from the Internet or load
1477
them from a local file. Each repository has a checkbox that can be used to
1478
activate or deactivate it. There are also buttons to edit and delete existing
1479
repositories.</para>
1481
<sect3 id="snippets-repo-internet">
1482
<title>Loading Snippet Repository Files</title>
1483
<para>You can download snippet repositories from the Internet. Just click
1484
<guibutton>Get New Snippets</guibutton> and a window with a list of snippet
1485
repositories will open. After downloading the desired snippet, make sure that
1486
you have activated it.</para>
1488
<para>You can also load snippet repositories from a local file using the file
1489
browser at the bottom of the panel. Click <guibutton>Copy to repository</guibutton>
1490
when finished.</para>
1493
<sect3 id="snippets-repo-editor">
1494
<title>Creating and Editing Snippets</title>
1496
<screenshot id="screenshot-snippets-form">
1497
<screeninfo>Snippet Editor</screeninfo>
1499
<imageobject><imagedata fileref="snippets-form.png" format="PNG"/></imageobject>
1500
<textobject><phrase>The snippet editor.</phrase></textobject>
1501
<caption><para>The snippet editor interface.</para></caption>
1505
<para>To create a new snippet repository, click <guibutton>New Snippet File</guibutton>.
1506
You should now see dialog that asks for name of the snippet file, license and
1507
author. After choosing the desired options, click <guibutton>Create</guibutton>,
1508
and the snippet editor will open.</para>
1510
<para>The snippet editor contains the following options:</para>
1514
<term><guilabel>File Type</guilabel></term>
1515
<listitem><para>Select the file type(s) you want the snippet repository to apply
1516
to. It is set to <quote>*</quote> by default, so the repository applies to all files. You
1517
can change it to something like <userinput>C++</userinput> for instance, or select
1518
from a list by hitting the <guibutton>Edit</guibutton>. You can specify more
1519
than one file type by separating them with <userinput>;</userinput>.</para></listitem>
1523
<term><guilabel>Authors</guilabel></term>
1524
<listitem><para>Enter the name(s) of the author(s) of the snippet file.</para></listitem>
1528
<term>Snippets List</term>
1529
<listitem><para>Contains all snippets defined in the snippet file. You can
1530
simply click on a snippet listed there to edit it.</para></listitem>
1534
<term>Add (<guibutton>+</guibutton>)</term>
1535
<listitem><para>Used to add a new snippet.</para></listitem>
1539
<term>Delete (<guibutton>-</guibutton>)</term>
1540
<listitem><para>Used to delete a snippet.</para></listitem>
1544
<term><guilabel>Match/Name</guilabel></term>
1545
<listitem><para>Appears in the list of snippets in the tool view and is also
1546
searched when using the code completion feature.</para></listitem>
1550
<term><guilabel>Display Prefix</guilabel>, <guilabel>Display Postfix</guilabel>,
1551
and <guilabel>Display Arguments</guilabel></term>
1552
<listitem><para>Used to display helpful information while using code completion.
1553
The prefix and postfix are displayed before and after the name, while the arguments
1554
are displayed in parenthesis immediately after the name.</para></listitem>
1558
<term><guilabel>Snippet Content</guilabel></term>
1559
<listitem><para>Reusable text or code. This is what appears in your document
1560
when the snippet is used.</para></listitem>
1565
<para>In <guilabel>Snippet Content</guilabel> you can specify variables with
1566
<userinput>${<replaceable>name</replaceable>}</userinput> or
1567
<userinput>%{<replaceable>name</replaceable>}</userinput>. These can be filled
1568
by QtScript or when the snippet is used. There is a special variable -
1569
${cursor} or %{cursor} - which automatically sets the cursor to its first
1575
<sect2 id="snippets-using">
1576
<title>Using Snippets</title>
1578
<screenshot id="screenshot-snippets-usage">
1579
<screeninfo>Kate Snippets in Action</screeninfo>
1581
<imageobject><imagedata fileref="snippets-usage.png" format="PNG"/></imageobject>
1582
<textobject><phrase>Accessing Kate Snippets from a tool view and a drop down menu.</phrase></textobject>
1583
<caption><para>Selecting from a list of snippets.</para></caption>
1587
<para>You can call snippets in two ways:</para>
1590
<listitem><para>By choosing the snippet from the tool view.</para></listitem>
1591
<listitem><para>While writing, you can press <keycombo action="simul">&Ctrl;
1592
<keysym>Space</keysym></keycombo>, which will display all the snippets in a
1593
convenient window from which you can choose from. You may enter the beginning
1594
of the snippets name before or after pressing this key combination, which provides
1595
functionality similar to code completion.</para></listitem>
1598
<para>If the snippet contains variables (besides <literal>${cursor}</literal>)
1599
the cursor will automatically go to the first occurrence of a variable and will
1600
wait for you to write something. When you are done, you can press 	 to move
1601
to the next variable, and so on.</para>
1605
<sect2 id="snippets-ack">
1606
<title>Thanks and Acknowledgments</title>
1607
<para>Special thanks to Google Code-In 2011 participant Martin Gergov for
1608
writing much of this section.</para>
1513
1614
Missing (according to config docs)
1514
Additional pages for enabled plugins:
1615
Additional pages for enabled plugins:
1516
1616
Backtrace Browser