&Anders.Lund; &Anders.Lund.mail;Working with PluginsKate is using two different forms of plugins, namely plugins for the
&kate; application and plugins for the &kate; editor component. The latter are
available to any application using the editor component, such as KDevelop,
Quanta, Kile, Kwrite and many others, while application plugins are specific
to the &kate; application.You can enable both types of plugins in the configuration dialog, which also
provides access to additional configuration options for plugins that requires
that.There are many plugins for various purposes available
and you can search the web for more. A few plugins are shipped with the
editor component, for inserting automatic braces, insert files,
data tools and exporting text as &HTML;.Editor Component PluginsThe Plugins tab on the Extensions page
lists all available plugins and you can check those you
want to use. Click on the Information button to open the
About dialog of this plugin.Once a configurable plugin is checked, the
Configure button is enabled and you can click it
in order to configure the highlighted plugin.AutoBraceThe autobrace plugin supersedes the &kate; internal
Auto Brackets feature.
It automatically inserts a closing brace } at the beginning
of the next line after ending a line with an opening one {
and pressing the &Enter; key.Data ToolsEnables data tools like thesaurus and spell check (if installed).
Data tools are only available when text is selected, or when the right mouse
button is clicked over a word. If no data tools are offered even when text
is selected, you need to install them. Some data tools are part of the
&koffice; package.
If this plugin is enabled and data tools are installed, additional items
appear at the end of the context menu.ExporterThis command allows you to export the current document with all highlighting
information into a HTML document using FileExport
as HTML. Additionally you can use EditCopy as HTML to copy the currently selected text
as HTML to the system clipboard.IconInserterThe icon inserter plugin is only of use for &kde; developers: It adds an item
Insert KIcon-Code into the context menu of the editor.
If activated, the &kde;'s icon chooser opens (showing application icons, action icons &etc;..).
If you click on it, the file name without file extension will be inserted as
text. Useful only for setting icons via &kde;'s framework through the KIcon() class.
Insane (not ZEN) HTML coding (light edition)A plugin, which does zen-coding like selector completion.
For more information see
Zen Coding.Insert FileThis plugin allows you to insert any readable file at the cursor position.
If enabled, the Tools menu has an additional menu item
Insert File.&kate; Application Plugins
&kate; plugins are additional functions for the &kate; editor. They can
add extra menus and shortcuts, and extend &kate;'s features. You can
install as many or as few as you like, from within &kate;.
Open &kate;'s configuration dialog with
SettingsConfigure &kate;...
Select ApplicationPlugins to
choose the wanted plugins.
The available application plugins are:
&gdb; - Provides a
simple &gdb; frontendBacktrace Browser - Backtrace navigation tool viewQuick Document switcher -
Quickly switch to another already opened documentSQL Plugin - Execute
query on SQL databasesSearch and Replace Plugin - Search or replace patterns in all open files or all files in a folderTab Bar - Adds a standard tab bar to &kate;'s main windowText Filter - Easy text filteringSymbol Viewer - Extract and show reference symbols from sourceFile system browser -
File system browser tool viewTerminal tool view - Toolview embedding a terminal widgetCTags Plugin - Look up definitions/declarations with CTagsFile Templates -
Create new files from templatesOpen Header - Opens the corresponding .h/[.cpp|.c] fileBuild Plugin - Compile or Make and parse error messagesMail files - Send files
via emailMultiline Tab Bar - Add a tab bar with multiple rows to &kate;'s main windowKate Snippets - Snippets plugin with code completion supportJovie Text-to-Speech Plugin - Adds a menu entry for speaking the text&XML; Validation- Validates &XML; files using xmllint&XML;Completetion - Lists &XML; elements,
attributes, attribute values and entities allowed by DTDTabify - Adds a tab bar to Kate's main window&Anders.Lund; &Anders.Lund.mail;File TemplatesThe File Templates plugin allows you to create files based on other
files.When you first install Kate, you need to enable the plugin:
Click SettingsConfigure Kate
In the tree on the left of the screen, click Plugins.
In the Plugin Manager panel on the right, select File Templates, and then click OK.
You can now use any file as a template (this creates a copy of the
file with an empty &URL;.) Special template files can contain
macros to fill in information such as your name, email address, the
current date, and position the cursor at a
convenient position in the new file.You can easily create a new template from an open document.Templates that you save to the template folder are
listed under the menu item FileNew from
Template.The template folder is part of the &kde; file system, and
consists of at least$KDEDIR/share/applications/kate/plugins/katefiletemplates/templates$KDEHOME/share/applications/kate/plugins/katefiletemplates/templates.If your KDEDIRS environment variable contains additional directories, those are
searched for a similar subdirectory as well. If equally named templates are
found, the one in the local (KDEHOME) folder is chosen.Menu StructureFileNew From TemplateAny File...Presents you with Open File dialog that allows
you to use any file as a template. If the chosen file has the
extension katetemplate it will be parsed
for template information and macros.FileNew From TemplateThe remainder of submenus contains links to
templates. Click a menuitem to create a file as described by
the menu item text.SettingsManage
Templates...This will launch a dialog with a list of all templates
found within the template directories, along with options to add,
edit or remove templates.Using a &kate; TemplateWhen creating a file from a template that contain template
macros, some macros appears as editable variables in the text. Such
variables appears as underlined words in the text.The first variable will be selected, so you just have to type to edit
it. If the document text contains more instances of the same variable,
they are changed as you edit. To move to the next editable variable,
press the 	 key. When the last variable is edited, the list is
dropped, and your 	 key works as normal.Creating your own templatesTo create a new template, use the
SettingsManage Templates Item to launch
the template management dialog. In that, click
New... to launch the File Template Wizard. You
will be asked for an optional file to turn into a template and prompted
for template information settings, and a template file will be created for
you.Alternatively, you can create a template manually by
adding template information to the top of any file, add text and macros,
and save it with the katetemplate extension.The template menu gets automatically updated if you chose to store
your template in the template directory.Editing templatesTo edit a template, use the
SettingsManage Templates.... Select the
template you want to work on and click Edit...,
and the template file will be opened. Close the dialog, edit the template
file as desired, save it and close it. Changes to templates takes
immediate effect, you can activate the template to test your changes after
saving it.The &kate; Template FormatIf you use files with the extension
katetemplate, they will be parsed for template
information, macros and a cursor position.Template informationWhile reading in the file, the parser keeps
lines beginning with the phrase
katetemplate: and searches them for
template information in the form VARIABLENAME=VALUE. The first line not
starting with katetemplate: will be taken as the
start of the template contents. VALUE may contain any character but
equal sign (=). Legal variable names are:
TemplateThis is the template name, displayed in the
FileNew from
Template menu.GroupThe group places the template in a submenu of
the FileNew from
Template menu.NameThis is the name that will be set for the
document, and displayed in the file list and title bar. If the
name contains %N that will be replaced
with a number, increasing if more documents has the same
name.HighlightThe plug-in will try to set the Highlight for
the new document to the value of this variable. The value
should be the name, as found in the
ToolsHighlighting.DescriptionA short informative description of the
template. This is currently used to set a Whatsthis string for
the menu item, but may be used for more purposes in the
future.AuthorA string identifying the author, for example
in the form Name <email address>.
This is currently used to set a Whatsthis string for the menu
item, but may be used for more purposes in the
future.Template MacrosWhile parsing the template contents, macros in the form
%{NAME} or ${NAME} are
expanded. If you use the $ prefix, the
expanded macro will be treated as a editable variable when a document
is created from the template, whereas if you use
% it is not, unless expanding failed.The following macros are expanded:
timeExpands to the current time in your locale
format.dateExpands to the current date in short
format.datetimeExpands to the current date and time,
formatted as a string according to your
locale.yearThe current year as a four digit
number.monthThe full name of the current month, according
to your locale.dayExpands to the current day of the month.hostnameExpands to the 'hostname' of your computer.indexExpands to 'i'.fullnameExpands to your full name, as defined by the
owner addressee in your standard &kde;
addressbook.firstnameExpands to your first name, as defined in the owner
addressee in your standard &kde; addressbook.lastnameExpands to your last name, as defined in the owner
addressee in your standard &kde; addressbook.emailExpands to your email address, as defined by
the owner address in your standard &kde;
addressbook.Any macro not in the above list is treated as a editable variable
no matter the prefix.
If the same variable occurs multiple times in the template, they can be
edited at once after creating a document from the template.Setting the cursor positionThe special macro ${cursor} will be replaced
with a vertical bar and added to the end of the list of editable variables,
independent on its location in the text.Thanks and Acknowledgments
&kate; Plugin File Templates copyright 2004 &Anders.Lund;
&Anders.Lund.mail;.
Documentation copyright 2004 &Anders.Lund;
&Daniel.Naber; &Daniel.Naber.mail;
&XML; ValidationThis plugin checks &XML; files for well-formedness and validity.This plugin checks the current file. A list of warnings and errors
will appears at the bottom of &kate;'s main window. You can click on an error message
to jump to the corresponding place in the file. If the file has a DOCTYPE
the DTD given with this doctype will be used to check the file for validity. The
DTD is expected at a position relative to the current file, ⪚ if the doctype
refers to DTD/xhtml1-transitional.dtd and the file is /home/peter/test.xml
the DTD is expected to be located at /home/peter/DTD/xhtml1-transitional.dtd.
However, remote DTDs specified via http are supported.If the file has no doctype it will be checked for well-formedness.To learn more about &XML; check out the official W3C &XML; pages.Internally this plugin calls the external command xmllint, which
is part of libxml2. If this command is not correctly installed on your system, the plugin
will not work.A temporary file needs to be written to the same folder as the file
that should be checked, so you need to have write access to that folder.To load this plugin open &kate;s configuration dialog under SettingsConfigure &kate;....
Then select XML Validation which will appear
in the Application / Plugins section and close the dialog.
Menu StructureXMLValidate XMLThis will start the check, as described above.Thanks and Acknowledgments
&kate; Plugin XML Validation copyright 2002 &Daniel.Naber;
&Daniel.Naber.mail;.
Documentation copyright 2002 &Daniel.Naber;
&Daniel.Naber; &Daniel.Naber.mail;
&XML; CompletionThis plugin gives hints about what is allowed at a certain position in
an &XML; file, according to the file's DTD. It will list possible
elements, attributes, attribute values or entities, depending on the
cursor position (⪚ all entities are listed if the character on the left
of the cursor is &). It's also possible to close the nearest
open tag on the left.The DTD must exist in &XML; format, as produced by the Perl program
dtdparse. We will call a DTD in this format meta DTD.
Some meta DTDs are supplied. They are installed in
$KDEDIR/share/apps/katexmltools/,
which is also the default folder when you choose
Assign Meta DTD....
To produce your own meta DTDs, get dtdparse from
http://dtdparse.sourceforge.net.How to UseStart &kate; and open the configuration dialog under SettingsConfigure &kate;....
Then select XML Completion which will appear
in the Application/Plugins section and close the dialog. After
that, select XMLAssign Meta DTD....
If your document contains no DOCTYPE or the doctype is unknown, you'll have to
select a meta DTD from the file system. Otherwise the meta DTD that
matches the current document's DOCTYPE will be loaded automatically.You can now use the plugin while typing your text:< (less than key)This will trigger a list of possible elements unless the
cursor is inside a tag already. Note that you currently cannot use
this to insert the top level element (⪚ <html>).</(less than key + slash)Entering these characters will offer closing the current element
(nearest open one to the left of the cursor). Press &Enter; to accept the suggestion.
Unlike the Close Element menu item, this works only with
a DTD assigned." (quote key)The quote key will trigger a list of possible attribute
values (if there are some) if you are inside a tag. (space key)This key will trigger a list of possible attributes for the
current element if you are inside a tag.& (ampersand key)This key will trigger a list of named entities.Features and LimitationsYou can test all functions and limitations by loading
$KDEDIR/share/apps/katexmltools/testcases.xml
into &kate; and following the instructions.Menu Structure&Ctrl;ReturnXMLInsert Element...This will open a dialog that lets you insert an &XML; element.
The <, > characters and the closing tag will be inserted automatically.
If you have selected text when this menu item is selected, the selected
text will be surrounded by the opening and the closing tag.
The dialog also offers completion of all elements that may be inserted
at the current cursor position if you have assigned a meta DTD by
using Assign Meta DTD....
&Ctrl;<XMLClose ElementThis will search your text for a tag that is not yet closed
and will close it by inserting the corresponding closing tag.
The search starts at the cursor position and goes left. If
it cannot find an open tag nothing will happen.XMLAssign Meta DTD...This will tell the plugin which meta DTD to use for the
current document. Note that this assignment will not be saved.
You will have to repeat it when you start &kate; the next time.Thanks and Acknowledgments
&kate; Plugin &XML; Completion copyright 2001,2002 &Daniel.Naber;
&Daniel.Naber.mail;.
KDE SC 4 version copyright 2010 Tomáš TrnkaDocumentation copyright 2001,2002 &Daniel.Naber;Quick Document SwitcherMenu Structure&Ctrl;1GoQuickswitch
Opens the Document Quick Switch dialog
with a search field and a list of opened files. While entering text in the search
field the document names and document urls are searched for matching text.
While entering text in the search field you can use
the cursor keys Up and Down to navigate in the
list view. If the dialog is left with OK the plugin switches
the view to the document selected in the list view. This makes switching between
documents easier, if there are a lot of them open.
ExporterMenu StructureFileExport as HTML...
Export your file in &HTML; format so your document can be viewed as a web page.
EditCopy as HTML...Copies selected text with the syntax highlight as HTML text.
&TC.Hollingsworth; &TC.Hollingsworth.mail;
Search and ReplaceIntroduction&kappname;'s Search in Files plugin allows you to search for text or
regular expressions in many different
files at once. You can search all open files, or all the files in one directory,
and optionally its subdirectories. You can even filter by filename, for instance
searching only files that end with a particular file extension.InterfaceSearch QueryThe following options are always displayed at the top of the Search in
Files tool view:New Tab
You can have as many searches as you want open at the same time. Simply click
the New Tab button at the top-left corner of the Search
tool view and a new results tab will open permitting you to perform another
search.
Query
The long text box at the top is where you type in what you want to find. You may
enter standard text, or a regular expression if enabled.
Search
When you've finished configuring everything, just press the
Search button to perform your search. You may also press
&Enter; in the Query text box to do the same.
Location
This has two options. Select in Open Files to search all
files currently open in &kappname;. Select in Folder to
search inside a folder and optionally its subfolders.
Options
There are two available options. If enabled, Match case
will restrict search results to only those that have the exact same combination
of upper and lower-case letters as your search query. Regular
expressions permits you to use
regular expressions instead of simple
text as your search query.
Toggle Results
The down arrow in the top right-corner of the Search in Files tool view will
toggle the bottom half of the tool view between displaying additional options
for the Search in Folder mode and the results of your search.
Search in Folder OptionsThese options are displayed below the aforementioned query options. If search
results are being displayed instead, press the Toggle Results
button to display them. These options apply only when Search in Folder mode is
enabled. If Search in Open Files is selected, they will be disabled.Folder
You may enter the path of the folder you wish to search. For instance, you might
enter ~/development/kde/kate/ if you wished to search the
&kate; source code.
Open file dialog
Press this button to locate for the folder in your desktop's folder browser.
Up
Press this button to change Folder to the parent of the
currently selected folder.
Restore Current Folder
This button will set the Folder entry to the folder in which
the currently open document is located.
Filter
This permits you to only search filenames that match a particular pattern. For
instance, to only search files written in C++, change it to
*.cpp. To search only files beginning with
kate, change it to kate*. You can
enter multiple filters separated with a comma (,). To
use this to exclude files from the search, append a minus sign
(-) to the list.
Recursive
If this option is enabled, &kappname; will also search in all subfolders of the
selected folder.
Include hidden
If this option is enabled, &kappname; will also search in files or folders that
are typically hidden by your &OS;.
Follow symbolic links
The Search in Files plugin typically doesn't follow
symbolic links.
When this option is enabled, the plugin will follow them instead and search inside
the files or folders they reference.
It's possible for symbolic links to reference a folder that is the
parent of the folder currently being searched, or other folders that contain
symbolic links to their parent. If there is such a link in the folder being
searched and this option is enabled, &kappname; will repeatedly follow the link
and search the folder, and the search will never complete.Search ResultsThe results of your search are displayed below the query options. If
options for Search in Folder mode are displayed, simply press the
Toggle Results button to display them. They will also
automatically be displayed as soon as a search is performed.The search results displays three columns providing information about each
result of your search query. The File column shows the name
of the file. The Line column displays the line number the
contents of your query were found in. The Text column displays
the full text of that line.To open the file your result was found in, simply double-click it. &kappname;
will open the file if needed, and place the cursor at the beginning of the text
entered as your query as found in the file.Menu StructureViewTool ViewsShow Search in FilesToggle the display of &kappname;'s Search in Files tool.
Mail FilesMenu StructureFileMail...
Open your mail client and attach the file in the mail.
Filesystem BrowserThe Filesystem Browser is a folder viewer, allowing you to open
files from a displayed folder in the current frame.Menu StructureViewTool ViewsShow Filesystem BrowserToggle the display of &kate;'s Filesystem BrowserInterfaceFrom top down, the Filesystem Browser consist of the following
elements:A ToolbarThis contains standard navigations tool buttons:BackCauses the folder view to cd to the previously displayed folder in the history.
This button is disabled, if there is no previous item.ForwardCauses the folder view to cd to the next folder in the history.
This button is disabled, if there is no next folder.BookmarksOpens a submenu to edit or add bookmarks and to add a new bookmark folder.Current Document FolderThis button will cause the folder view to
cd to the folder of the currently active
document if possible. This button is disabled, if the active document
is a new, unsaved file, or the folder in which it resides can not
be decided.OptionsShort ViewDisplays only the filenames.Detailed ViewDisplays Name, Date,
Size and Type of the files.Tree ViewLike Short View, but folders can be expanded to view their contents.Detailed Tree ViewThis also allows folders to be expanded, but displays the additional columns
available in Detailed View.Show Hidden FilesDisplays files normally hidden by your operating system.Automatically synchronize with current documentWhen this option is enabled the filesystem browser will automatically cd
to the folder of the document currently open in the editing area every time it changes.A Location EntryThis displays a breadcrumb navigation to the currently open folder, like
&dolphin;. You can click on a any folder to browse to it, or click on one of the
arrows to the left of a folder to select any folders beneath it. You may also
select from your list of Places by clicking the leftmost icon in the breadcrumb
navigation, which displays an icon that represents your current Place.You can also click to the right of the breadcrumbs to change them to a text box
where you can type the path of a folder to browse. The &URL;
entry maintains a list of previously typed paths. To choose one, use
the arrow button to the right of the entry.The &URL; entry has folder auto-completion. The completion
method can be set using the &RMB; menu of the text
entry.A Folder ViewThis is a standard &kde; folder view.A Filter EntryThe Filter entry allows you to enter a filter for the files
displayed in the folder view. The filter uses standard globs; patterns
must be separated by white space. Example: *.cpp *.h
*.mocTo display all files, enter a single asterisk
*.The filter entry saves the last 10 filters entered between
sessions. To use one, press the arrow button on the right of the entry
and select the desired filter string. You can disable the filter by pressing
the Clear text button to the left of the autocompletion
arrow button.ConfigurationThis plugin can be configured on the Filesystem Browser page
of &kate;'s configuration.ToolbarConfigure the buttons on the file system browser toolbar
by moving the ones you want enabled to the Selected Actions
list, and order them using the arrow buttons at the side of the list.MartinGergov&TC.Hollingsworth; &TC.Hollingsworth.mail;Kate SnippetsIntroductionKate Snippets is a plugin used to save you some time by adding support for
so-called "snippets" (re-usable source code, machine code or text). The plugin
also supports code completion and QtScript.Menu StructureViewTool ViewsShow Kate SnippetsShows snippets panel containing all snippets in your repository
that are for the currently opened file type.ConfigurationThe configuration for Kate Snippets can be accessed in SettingsConfigure Kate,
in Kate Snippets under Application.Kate Snippets ConfigurationThe Kate snippets configuration panel.
The configuration panel for Kate Snippets.
In the configuration panel you should see a list of snippet repositories,
along with options to create your own, get them from the Internet or load
them from a local file. Each repository has a checkbox that can be used to
activate or deactivate it. There are also buttons to edit and delete existing
repositories.Loading Snippet Repository FilesYou can download snippet repositories from the Internet. Just click
Get New Snippets and a window with a list of snippet
repositories will open. After downloading the desired snippet, make sure that
you have activated it.You can also load snippet repositories from a local file using the file
browser at the bottom of the panel. Click Copy to repository
when finished.Creating and Editing SnippetsSnippet EditorThe snippet editor.
The snippet editor interface.
To create a new snippet repository, click New Snippet File.
You should now see dialog that asks for name of the snippet file, license and
author. After choosing the desired options, click Create,
and the snippet editor will open.The snippet editor contains the following options:File TypeSelect the file type(s) you want the snippet repository to apply
to. It is set to * by default, so the repository applies to all files. You
can change it to something like C++ for instance, or select
from a list by hitting the Edit. You can specify more
than one file type by separating them with ;.AuthorsEnter the name(s) of the author(s) of the snippet file.Snippets ListContains all snippets defined in the snippet file. You can
simply click on a snippet listed there to edit it.Add (+)Used to add a new snippet.Delete (-)Used to delete a snippet.Match/NameAppears in the list of snippets in the tool view and is also
searched when using the code completion feature.Display Prefix, Display Postfix,
and Display ArgumentsUsed to display helpful information while using code completion.
The prefix and postfix are displayed before and after the name, while the arguments
are displayed in parenthesis immediately after the name.Snippet ContentReusable text or code. This is what appears in your document
when the snippet is used.In Snippet Content you can specify variables with
${name} or
%{name}. These can be filled
by QtScript or when the snippet is used. There is a special variable -
${cursor} or %{cursor} - which automatically sets the cursor to its first
occurrence.Using SnippetsKate Snippets in ActionAccessing Kate Snippets from a tool view and a drop down menu.
Selecting from a list of snippets.
You can call snippets in two ways:By choosing the snippet from the tool view.While writing, you can press &Ctrl;
Space, which will display all the snippets in a
convenient window from which you can choose from. You may enter the beginning
of the snippets name before or after pressing this key combination, which provides
functionality similar to code completion.If the snippet contains variables (besides ${cursor})
the cursor will automatically go to the first occurrence of a variable and will
wait for you to write something. When you are done, you can press 	 to move
to the next variable, and so on.Thanks and AcknowledgmentsKate Snippets was written by Joseph Wenninger.Special thanks to Google Code-In 2011 participant Martin Gergov for
writing much of this section.SalmaSultana&TC.Hollingsworth; &TC.Hollingsworth.mail;Build PluginIntroductionThe Build plugin allows you to run actions like build, clean and compile
on a project.Using the Build PluginThe Build plugin adds a Build Output tool view at the
bottom and a Build menu on the menubar. The tool view can be used to configure
build target settings, while the menu can be used to perform build, clean and
compile actions.The Build Output tool view has three tabs:Errors & WarningsOutputTarget SettingsTarget Settings tabThe target settings tab can be used to configure various build targets.Each target contains four configuration options:Working DirectoryYou can set the path to the project here. Leave this empty to
use the directory the current document is located in.BuildThis option lets you define the build command. It is set to
make by default.CleanThe option lets you define the clean command. It is set to
make clean by default.Quick CompileThis option lets you define the quick compile command. It is set
to gcc -Wall -g %f by default.One can create a new target by using the New button.
The Copy button can be used to make a copy of an existing
target. To delete a target, use the Delete button.Output tabThe Output tab shows the console output generated by
the last command.Errors & WarningsThe Errors & Warnings tab lists the errors and
warnings generated by the last command.Each line contains a message and the file name and line number if available.
Clicking on the error or warning takes you to the appropriate file and places
the cursor on the corresponding line number.To navigate to the previous error, press
&Ctrl;&Alt;Left.
To navigate to the next error, press
&Ctrl;&Alt;Right.Menu StructureBuildBuildRuns the Build command for the currently
selected target.BuildCleanRuns the Clean command for the currently
selected target.BuildQuick CompileRuns the Quick Compile command for the
currently selected target.&Ctrl;&Alt;LeftBuildPrevious ErrorMoves the cursor to the location of the previous error in the
document.&Ctrl;&Alt;RightBuildNext ErrorMoves the cursor to the location of the next error in the
document.BuildTargetsSelect from a list of targets configured by the user.BuildNext TargetSwitch to the next target configured by the user.Thanks and AcknowledgmentsThe &kate; Build Plugin was written by Kåre Särs.Special thanks to Google Code-In 2011 participant Salma Sultana for
writing much of this section.ÖmerFarukORUÇ&TC.Hollingsworth; &TC.Hollingsworth.mail;SQL PluginIntroductionThe Structured Query Language (SQL) is a specialized language for updating,
deleting, and requesting information from databases.The Kate SQL Plugin allows you to:Create a databaseConnect to existing databasesInsert and delete data in the databaseExecute queriesDisplay results in a tableConnecting to a DatabaseSelect Add Connection from the SQL
menu or toolbar, and then select the Qt database driver you want to use (including
QSQLITE, QMYSQL3, QMYSQL, QODBC3, QODBC, QPSQL7, and QPSQL). If you can't see
the desired driver, you need to install it. Then, press NextIf the database you selected uses a file, simply indicate the database's
location and press the Next button. If it requires connecting
to a server, you must enter the hostname of the server, your username and password,
and any other information that particular driver may require. Then press
NextFinally, give a name to your connection, and press Finish.Running QueriesINSERT/DELETE/UPDATEYou can insert, delete, and update data using the SQL plugin just like
you would from the command line or from within a program. Simply enter a query
and press the Run query.Some Example QueriesINSERT
INSERT INTO table_name ("feature1", "feature2", "feature3", "feature4", "feature5")
VALUES ("value1", "value2", "value3", "value4", "value5" )
DELETE
DELETE FROM table_name WHERE name = "text"
UPDATE
UPDATE table_name SET "feature1" = "text", "feature2" = "text", "feature3" = "text", "feature4" = "text", "feature5" = "text"
SELECTAfter running a SELECT query, you can view the results
as a table that will appear in the SQL Data Output tool view at
the bottom of &kappname;, or as text in the SQL Text Output.
If there is an error, you can see it in the text output.Example SELECT Query
SELECT * FROM table_nameIn the SQL Data Output tool view, there are some buttons:Resize columns to contentsChanges the size of columns to fit their contents.Resize rows to contentsChanges the size of rows to fit their contents.CopySelects all table contents and copies them to the clipboard buffer.ExportExports all table contents to a file, the clipboard, or the
current document in the Comma Separated Values format.ClearRemoves everything from table viewYou can now change the colors displayed in the table in the SQL
section of SettingsConfigure Kate.BrowsingYou can browse your database using the SQL Schema Browser
tool view on the left. The information displayed varies depending on which
database driver you are using.To refresh this list, right-click anywhere in the tool view and select
Refresh. To generate a query on any entry in the list,
right-click on an entry, select Generate, and select the
query type (SELECT, UPDATE,
INSERT, and DELETE) from
the submenu that appears.Menu StructureSQLAdd connection...
Adds a new connection using any database driver.
SQLRemove connection
Removes the selected connection.
SQLEdit connection...
Edits the current connection's settings.
Connections
All database connections you have created are listed between the
Edit connection and Run query
menu items. Select one to run queries or make modification to it.
&Ctrl;ESQLRun query
Runs your query.
Thanks and AcknowledgmentsThe SQL Plugin was written by Marco Mentasti.Special thanks to Google Code-In 2011 participant Ömer Faruk ORUÇ for
writing much of this section.MartinGergov&TC.Hollingsworth; &TC.Hollingsworth.mail;&gdb; PluginIntroduction&kappname;'s &gdb; plugin provides a simple frontend to the popular &GNU;
Project Debugger.Previous experience with &gdb; is strongly recommended. For more
information on using &gdb;, visit the
&gdb; websiteYou can enable the &gdb; plugin in
the Plugins section of &kappname;'s
configuration.For the plugin to work properly, you must have a source file (of any type
supported by &gdb;) and an executable.If you compile using &gcc;/g++ you might want to use
the -ggdb command line argument.
After these preparations are made, open the source file in &kappname;,
enter the path to the executable in Settings tab of the
Debug View tool view, and select
DebugStart Debugging
from the menu to get started.Menu and Toolbar StructureAll of these options are available in &kappname;'s menus, and many are
available on the Debug toolbar as well.ViewTool ViewShow Debug ViewShows a tool view containing &gdb; output, the &gdb; command
line used, and other settings.ViewTool ViewShow LocalsShows a list of all currently loaded variables and their values.
ViewTool ViewShow Call StackShows a &gdb; backtrace.DebugTargetsA submenu containing a list of targets (executables).
DebugArg ListsA submenu containing all argument lists.DebugStart DebuggingStarts &gdb; with a target.DebugKill / Stop DebuggingStops &gdb;.DebugRestart DebuggingRestarts &gdb;.DebugToggle Breakpoint / BreakSet a breakpoint at the current cursor position.
DebugStep InExecute the present statement (function call will be debugged).
DebugStep OverExecute the present statement (function call will not be
debugged).DebugStep OutResumes execution until the program that is executing
terminates.DebugMove PCMove program counter (next execution).DebugRun To CursorRuns the program until it reaches current cursor position.
DebugContinueIgnores any breakpoints and executes program until it terminates
(successfully or not).DebugPrint ValuePrints the value of the variable that the cursor is currently
pointing to.SettingsToolbars Shown&gdb; PluginDisplay the debugging toolbar.Debug ViewThe Debug View tool view consists of several tabs:
&gdb; OutputContains output from &gdb; and a &gdb; command line.The Output TabThe Output tab.
The Output tab displaying the output from a
debugging session.
SettingsTargetPath to the target (executable) for debugging.Working DirectoryThe current working directory provided to the target.
Arg ListArguments passed to the program.Keep focusKeeps focus on the &gdb; command line.Redirect IOOpens a new IO tab in the Debug
View where you can view output and provide input to the running
program.The Settings TabThe Settings tab.
The Settings tab displaying the configuration
of a debugging session.
IOContains an area that displays output from the running program and a
command line where you may provide input to it.The IO TabThe IO tab.
The IO tab displaying output from a simple
test program.
Call Stack and LocalsThe Call Stack tool view contains list of formated
backtrace returned from &gdb;.The &gdb; Call Stack Tool ViewThe Call Stack tool view.
The &gdb; Plugin's Call Stack tool view.
The Locals tool view contains a list of all currently
loaded variables from the program and their corresponding values.The &gdb; Locals Tool ViewThe Locals tool view.
The &gdb; Plugin's Locals tool view.
Thanks and AcknowledgmentsSpecial thanks to Google Code-In 2011 participant Martin Gergov for
writing much of this section.