forked from qt-creator/qt-creator
Doc: fix misleading information about indentation
Intentation is set separately for text files that contain C++ or QML code and other text files. Change-Id: I5106d794ad516f745b07b0ebbb94bd4a652060d8 Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
|
||||
You can also specify indentation settings separately for C++ and QML files
|
||||
either globally or for the open project. For more information, see
|
||||
\l{Indenting Code}.
|
||||
\l{Indenting Text or Code}.
|
||||
|
||||
You can perform the following configuration actions:
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
{definition files for syntax highlighting} for other types of files
|
||||
than C++ or QML in \gui{Generic Highlighter}.
|
||||
|
||||
\li Set \l{Indenting Code}{tabs, indentation, the handling of
|
||||
\li Set \l{Indenting Text or Code}{tabs, indentation, the handling of
|
||||
whitespace, and mouse operations} in \gui Behavior.
|
||||
|
||||
\li Set various display properties, for example,
|
||||
|
@@ -63,10 +63,10 @@
|
||||
\QC anticipates what you are going to write and completes code
|
||||
and code snippets for elements, properties, and IDs.
|
||||
|
||||
\li \l{Indenting Code}
|
||||
\li \l{Indenting Text or Code}
|
||||
|
||||
\QC indents code according to rules that you specify either
|
||||
globally for all files or separately for text, C++, or QML files.
|
||||
\QC indents text and code according to rules that you specify separately for
|
||||
files that contain C++ or QML code and for other text files.
|
||||
|
||||
\li \l{Using Qt Quick Toolbars}
|
||||
|
||||
|
@@ -1004,44 +1004,29 @@
|
||||
\page creator-indenting-code.html
|
||||
\nextpage qt-quick-toolbars.html
|
||||
|
||||
\title Indenting Code
|
||||
\title Indenting Text or Code
|
||||
|
||||
When you type code, it is indented automatically according to the selected
|
||||
text editor and code style options. Select a block to indent it when you
|
||||
When you type text or code, it is indented automatically according to the selected
|
||||
text editor or code style options. Select a block to indent it when you
|
||||
press \key Tab. Press \key {Shift+Tab} to decrease the indentation. You
|
||||
can disable automatic indentation.
|
||||
|
||||
You can specify indentation either globally for all files or separately
|
||||
for:
|
||||
You can specify indentation for:
|
||||
|
||||
\list
|
||||
|
||||
\li Text files
|
||||
|
||||
\li C++ files
|
||||
|
||||
\li QML files
|
||||
|
||||
\li Other text files
|
||||
|
||||
\endlist
|
||||
|
||||
You can also specify indentation separately for each project. You can
|
||||
specify several sets of code style settings and easily switch between them.
|
||||
In addition, you can import and export code style settings.
|
||||
|
||||
\section1 Indenting Text Files
|
||||
|
||||
To specify global indentation settings for the text editor, select
|
||||
\gui {Tools > Options > Text Editor > Behavior}. You can also use these
|
||||
settings globally for all editors and files.
|
||||
|
||||
\image qtcreator-indentation.png "Text Editor Behavior options"
|
||||
|
||||
To specify settings for a particular project, select \gui {Projects >
|
||||
Editor Settings}.
|
||||
|
||||
You can specify how to interpret the \key Tab and \key Backspace key
|
||||
presses and how to align continuation lines.
|
||||
|
||||
\section1 Indenting C++ Files
|
||||
|
||||
To specify indentation settings for the C++ editor:
|
||||
@@ -1082,12 +1067,12 @@
|
||||
|
||||
You can use the live preview to see how the options change the indentation.
|
||||
|
||||
To specify the settings for a particular project, select \gui {Projects >
|
||||
To specify different settings for a particular project, select \gui {Projects >
|
||||
Code Style Settings}.
|
||||
|
||||
\section1 Indenting QML Files
|
||||
|
||||
To specify global settings for the Qt Quick editor:
|
||||
To specify settings for the Qt Quick editor:
|
||||
|
||||
\list 1
|
||||
|
||||
@@ -1109,26 +1094,39 @@
|
||||
You can specify how to interpret the \key Tab key presses and how to align
|
||||
continuation lines.
|
||||
|
||||
To specify the settings for a particular project, select \gui {Projects >
|
||||
To specify different settings for a particular project, select \gui {Projects >
|
||||
Code Style Settings}.
|
||||
|
||||
\section1 Indenting Other Text Files
|
||||
|
||||
To specify indentation settings for text files that do not contain C++ or QML code (such
|
||||
as Python code files), select \gui {Tools > Options > Text Editor > Behavior}.
|
||||
|
||||
\image qtcreator-indentation.png "Text Editor Behavior options"
|
||||
|
||||
To specify different settings for a particular project, select \gui {Projects >
|
||||
Editor Settings}.
|
||||
|
||||
You can specify how to interpret the \key Tab and \key Backspace key
|
||||
presses and how to align continuation lines.
|
||||
|
||||
\section1 Specifying Tab Settings
|
||||
|
||||
You can specify tab settings at the following levels:
|
||||
|
||||
\list
|
||||
|
||||
\li Global settings for all files
|
||||
\li For all C++ files
|
||||
|
||||
\li Global C++ settings for C++ files
|
||||
\li For all QML files
|
||||
|
||||
\li Global Qt Quick settings for QML files
|
||||
\li For all other text files
|
||||
|
||||
\li Project specific settings for all editors of files in the project
|
||||
\li For C++ files in a project
|
||||
|
||||
\li Project specific settings for C++ files in the project
|
||||
\li For QML files in a project
|
||||
|
||||
\li Project specific settings for QML files in the project
|
||||
\li For other text files in a project
|
||||
|
||||
\endlist
|
||||
|
||||
@@ -1150,8 +1148,8 @@
|
||||
|
||||
\section2 Speficying Typing Options
|
||||
|
||||
When you type code, it is indented automatically according to the selected
|
||||
text editor and code style options. Specify typing options in the
|
||||
When you type text or code, it is indented automatically according to the selected
|
||||
text editor or code style options. Specify typing options in the
|
||||
\gui Typing group. To disable automatic indentation, deselect the
|
||||
\gui {Enable automatic indentation} check box.
|
||||
|
||||
|
@@ -70,6 +70,6 @@
|
||||
|
||||
\endlist
|
||||
|
||||
For more information about the settings, see \l{Indenting Code}.
|
||||
For more information about the settings, see \l{Indenting Text or Code}.
|
||||
|
||||
*/
|
||||
|
@@ -59,7 +59,7 @@
|
||||
|
||||
\list
|
||||
|
||||
\li \l{Indenting Code}
|
||||
\li \l{Indenting Text or Code}
|
||||
|
||||
\li \l{File Encoding}
|
||||
|
||||
|
@@ -209,7 +209,7 @@
|
||||
\li \l{Semantic Highlighting}
|
||||
\li \l{Checking Code Syntax}
|
||||
\li \l{Completing Code}
|
||||
\li \l{Indenting Code}
|
||||
\li \l{Indenting Text or Code}
|
||||
\li \l{Using Qt Quick Toolbars}
|
||||
\li \l{Pasting and Fetching Code Snippets}
|
||||
\li \l{Using Text Editing Macros}
|
||||
|
Reference in New Issue
Block a user