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
|
You can also specify indentation settings separately for C++ and QML files
|
||||||
either globally or for the open project. For more information, see
|
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:
|
You can perform the following configuration actions:
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
{definition files for syntax highlighting} for other types of files
|
{definition files for syntax highlighting} for other types of files
|
||||||
than C++ or QML in \gui{Generic Highlighter}.
|
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.
|
whitespace, and mouse operations} in \gui Behavior.
|
||||||
|
|
||||||
\li Set various display properties, for example,
|
\li Set various display properties, for example,
|
||||||
|
@@ -63,10 +63,10 @@
|
|||||||
\QC anticipates what you are going to write and completes code
|
\QC anticipates what you are going to write and completes code
|
||||||
and code snippets for elements, properties, and IDs.
|
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
|
\QC indents text and code according to rules that you specify separately for
|
||||||
globally for all files or separately for text, C++, or QML files.
|
files that contain C++ or QML code and for other text files.
|
||||||
|
|
||||||
\li \l{Using Qt Quick Toolbars}
|
\li \l{Using Qt Quick Toolbars}
|
||||||
|
|
||||||
|
@@ -1004,44 +1004,29 @@
|
|||||||
\page creator-indenting-code.html
|
\page creator-indenting-code.html
|
||||||
\nextpage qt-quick-toolbars.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
|
When you type text or code, it is indented automatically according to the selected
|
||||||
text editor and code style options. Select a block to indent it when you
|
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
|
press \key Tab. Press \key {Shift+Tab} to decrease the indentation. You
|
||||||
can disable automatic indentation.
|
can disable automatic indentation.
|
||||||
|
|
||||||
You can specify indentation either globally for all files or separately
|
You can specify indentation for:
|
||||||
for:
|
|
||||||
|
|
||||||
\list
|
\list
|
||||||
|
|
||||||
\li Text files
|
|
||||||
|
|
||||||
\li C++ files
|
\li C++ files
|
||||||
|
|
||||||
\li QML files
|
\li QML files
|
||||||
|
|
||||||
|
\li Other text files
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
You can also specify indentation separately for each project. You can
|
You can also specify indentation separately for each project. You can
|
||||||
specify several sets of code style settings and easily switch between them.
|
specify several sets of code style settings and easily switch between them.
|
||||||
In addition, you can import and export code style settings.
|
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
|
\section1 Indenting C++ Files
|
||||||
|
|
||||||
To specify indentation settings for the C++ editor:
|
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.
|
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}.
|
Code Style Settings}.
|
||||||
|
|
||||||
\section1 Indenting QML Files
|
\section1 Indenting QML Files
|
||||||
|
|
||||||
To specify global settings for the Qt Quick editor:
|
To specify settings for the Qt Quick editor:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
@@ -1109,26 +1094,39 @@
|
|||||||
You can specify how to interpret the \key Tab key presses and how to align
|
You can specify how to interpret the \key Tab key presses and how to align
|
||||||
continuation lines.
|
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}.
|
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
|
\section1 Specifying Tab Settings
|
||||||
|
|
||||||
You can specify tab settings at the following levels:
|
You can specify tab settings at the following levels:
|
||||||
|
|
||||||
\list
|
\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
|
\endlist
|
||||||
|
|
||||||
@@ -1150,8 +1148,8 @@
|
|||||||
|
|
||||||
\section2 Speficying Typing Options
|
\section2 Speficying Typing Options
|
||||||
|
|
||||||
When you type code, it is indented automatically according to the selected
|
When you type text or code, it is indented automatically according to the selected
|
||||||
text editor and code style options. Specify typing options in the
|
text editor or code style options. Specify typing options in the
|
||||||
\gui Typing group. To disable automatic indentation, deselect the
|
\gui Typing group. To disable automatic indentation, deselect the
|
||||||
\gui {Enable automatic indentation} check box.
|
\gui {Enable automatic indentation} check box.
|
||||||
|
|
||||||
|
@@ -70,6 +70,6 @@
|
|||||||
|
|
||||||
\endlist
|
\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
|
\list
|
||||||
|
|
||||||
\li \l{Indenting Code}
|
\li \l{Indenting Text or Code}
|
||||||
|
|
||||||
\li \l{File Encoding}
|
\li \l{File Encoding}
|
||||||
|
|
||||||
|
@@ -209,7 +209,7 @@
|
|||||||
\li \l{Semantic Highlighting}
|
\li \l{Semantic Highlighting}
|
||||||
\li \l{Checking Code Syntax}
|
\li \l{Checking Code Syntax}
|
||||||
\li \l{Completing Code}
|
\li \l{Completing Code}
|
||||||
\li \l{Indenting Code}
|
\li \l{Indenting Text or Code}
|
||||||
\li \l{Using Qt Quick Toolbars}
|
\li \l{Using Qt Quick Toolbars}
|
||||||
\li \l{Pasting and Fetching Code Snippets}
|
\li \l{Pasting and Fetching Code Snippets}
|
||||||
\li \l{Using Text Editing Macros}
|
\li \l{Using Text Editing Macros}
|
||||||
|
Reference in New Issue
Block a user