Commit 84a23314 authored by Leena Miettinen's avatar Leena Miettinen
Browse files

Doc - Add information about Generic Highlighter. Add screen shots.

Reviewed-by: Leandro T. C. Melo
parent ffdd1765
......@@ -1166,10 +1166,14 @@
needs. To configure the editor, select \gui Tools > \gui{Options...} >
\gui{Text Editor}.
\image qtcreator-font-colors.png "Text editor options"
You can perform the following configuration actions:
\o Set the font preferences and apply syntax highlighting in
\o Set the font preferences and apply color schemes for syntax highlighting in
\gui{Font & Colors}.
\o Specify definition files for syntax highlighting for other types of files than
C++ or QML in \gui{Generic Highlighter}.
\o Set tabs, indentation, the handling of whitespace, and mouse operations in
\gui Behavior.
\o Set various display properties, for example,
......@@ -1196,7 +1200,10 @@
\section2 Defining Color Schemes
You can select one of the predefined color schemes for syntax highlighting
or create customized color schemes. To create a color scheme:
or create customized color schemes. The color schemes apply to highlighting
both C++ and QML files and generic files.
To create a color scheme:
\list 1
......@@ -1219,8 +1226,62 @@
format. The latter makes sure that syntax highlighting is preserved when
pasting to a rich-text editor.
\section2 Generic Highlighting
Generic highlighting is based on highlight definition files that are provided by the
\l{}{Kate Editor}.
You can download highlight definition files for use with Qt Creator.
If you have a Unix installation that comes with the Kate Editor, you might already
have the definition files installed. Typically, the files are in a read-only directory,
and therefore, you cannot manage them. Qt Creator can try to locate them and use them
as fallback files, when the primary location does not contain the definition for the
current file type. You can also specify the directory that contains preinstalled
highlight definition files as the primary location.
When you open a file for editing and the editor cannot find the highlight definition
for it, an alert appears. You can turn off the alerts. You can also specify patterns
for ignoring files. The editor will not alert you if highlight definitions for the
ignored files are not found.
To download highlight definition files:
\list 1
\o Select \gui {Tools > Options... > Text Editor > Generic Highlighter}.
\image qtcreator-generic-highlighter.png "Generic Highlighter options"
\o In the \gui Location field, specify the path to the primary location for
highlight definition files.
\o Click \gui Manage to open a list of highlight definition files available for
\image qtcreator-manage-definitions.png "Manage Definitions dialog"
\o Select highlight definition files in the list and click \gui{Download Selected
\o Select the \gui {Use fallback location} to specify the secondary location
where the editor will look for highlight definition files.
\o Click \gui Autodetect to allow Qt Creator to look for highlight definition
files on your system, or click \gui Browse to locate them in the file system
\o In the \gui {Ignored file patterns} field, specify file patterns. You will not
receive alerts if the highlight definitions for the specified files are not found.
\o Click \gui OK to save your changes.
\section2 Indenting Code
\image qtcreator-indentation.png "Text Editor Behavior options"
When you type code, it is indented automatically according to the selected
options. Select a block to indent it when you press \key Tab.
Press \key {Shift+Tab} to decrease the indentation.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment