Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
doc/images/qtcreator-font-colors.png

21.7 KiB

doc/images/qtcreator-generic-highlighter.png

38.4 KiB

doc/images/qtcreator-indentation.png

20.1 KiB

doc/images/qtcreator-manage-definitions.png

30.5 KiB

...@@ -1166,10 +1166,14 @@ ...@@ -1166,10 +1166,14 @@
needs. To configure the editor, select \gui Tools > \gui{Options...} > needs. To configure the editor, select \gui Tools > \gui{Options...} >
\gui{Text Editor}. \gui{Text Editor}.
\image qtcreator-font-colors.png "Text editor options"
You can perform the following configuration actions: You can perform the following configuration actions:
\list \list
\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}. \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 \o Set tabs, indentation, the handling of whitespace, and mouse operations in
\gui Behavior. \gui Behavior.
\o Set various display properties, for example, \o Set various display properties, for example,
...@@ -1196,7 +1200,10 @@ ...@@ -1196,7 +1200,10 @@
\section2 Defining Color Schemes \section2 Defining Color Schemes
You can select one of the predefined color schemes for syntax highlighting 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 \list 1
...@@ -1219,8 +1226,62 @@ ...@@ -1219,8 +1226,62 @@
format. The latter makes sure that syntax highlighting is preserved when format. The latter makes sure that syntax highlighting is preserved when
pasting to a rich-text editor. pasting to a rich-text editor.
\section2 Generic Highlighting
Generic highlighting is based on highlight definition files that are provided by the
\l{http://kate-editor.org/2005/03/24/writing-a-syntax-highlighting-file/}{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
download.
\image qtcreator-manage-definitions.png "Manage Definitions dialog"
\o Select highlight definition files in the list and click \gui{Download Selected
Definitions}.
\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
yourself.
\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.
\endlist
\section2 Indenting Code \section2 Indenting Code
\image qtcreator-indentation.png "Text Editor Behavior options"
When you type code, it is indented automatically according to the selected When you type code, it is indented automatically according to the selected
options. Select a block to indent it when you press \key Tab. options. Select a block to indent it when you press \key Tab.
Press \key {Shift+Tab} to decrease the indentation. Press \key {Shift+Tab} to decrease the indentation.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment