forked from qt-creator/qt-creator
Doc: Describe Tools > C++ > Fold/Unfold All Comment Blocks
Task-number: QTCREATORBUG-29392 Change-Id: Ie92253165b5004455be6f7dd8e031431c4358dae Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -57,9 +57,8 @@
|
|||||||
\li Set \l{Indent text or code}{tabs, indentation, the handling of
|
\li Set \l{Indent text or code}{tabs, indentation, the handling of
|
||||||
whitespace, and mouse operations} in \uicontrol Behavior.
|
whitespace, and mouse operations} in \uicontrol Behavior.
|
||||||
|
|
||||||
\li Set various display properties, such as
|
\li Set various display properties, such as \l{Highlighting Blocks}
|
||||||
\l{Highlighting and folding blocks}
|
{highlighting} or \l{Folding Blocks}{folding} blocks or text
|
||||||
{highlighting and folding blocks} or text
|
|
||||||
wrapping in \uicontrol Display.
|
wrapping in \uicontrol Display.
|
||||||
|
|
||||||
\li Add, modify, and remove \l{Editing Code Snippets}{code snippets} in
|
\li Add, modify, and remove \l{Editing Code Snippets}{code snippets} in
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
apply the changes you make to the definition files, select
|
apply the changes you make to the definition files, select
|
||||||
\uicontrol {Reload Definitions}.
|
\uicontrol {Reload Definitions}.
|
||||||
|
|
||||||
\section1 Highlighting and Folding Blocks
|
\section1 Highlighting Blocks
|
||||||
|
|
||||||
Use block highlighting to visually separate parts of the code that belong
|
Use block highlighting to visually separate parts of the code that belong
|
||||||
together. For example, when you place the cursor within the braces, the code
|
together. For example, when you place the cursor within the braces, the code
|
||||||
@@ -80,6 +80,8 @@
|
|||||||
To enable block highlighting, select \preferences > \uicontrol {Text Editor}
|
To enable block highlighting, select \preferences > \uicontrol {Text Editor}
|
||||||
> \uicontrol Display > \uicontrol {Highlight blocks}.
|
> \uicontrol Display > \uicontrol {Highlight blocks}.
|
||||||
|
|
||||||
|
\section1 Folding Blocks
|
||||||
|
|
||||||
Use the folding markers to collapse and expand blocks of code within braces.
|
Use the folding markers to collapse and expand blocks of code within braces.
|
||||||
Click the folding marker to collapse or expand a block. In the figure above,
|
Click the folding marker to collapse or expand a block. In the figure above,
|
||||||
the folding markers are located between the line number and the text pane.
|
the folding markers are located between the line number and the text pane.
|
||||||
@@ -90,10 +92,21 @@
|
|||||||
|
|
||||||
\image qtcreator-options-text-editor-display.png "Text Editor Display preferences"
|
\image qtcreator-options-text-editor-display.png "Text Editor Display preferences"
|
||||||
|
|
||||||
When the cursor is on a brace, the matching brace is animated by default. To
|
\section2 Folding All Comment Blocks
|
||||||
turn off the animation and just highlight the block and the braces, select
|
|
||||||
\preferences > \uicontrol {Text Editor} >
|
To fold all comment blocks, select \uicontrol Tools > \uicontrol C++ >
|
||||||
\uicontrol Display and deselect \uicontrol {Animate matching parentheses}.
|
\uicontrol {Fold All Comment Blocks}. To unfold all comment blocks, select
|
||||||
|
\uicontrol {Unfold All Comment Blocks}.
|
||||||
|
|
||||||
|
\section1 Animating Matching Braces
|
||||||
|
|
||||||
|
When the cursor is on a brace, the matching brace is animated by default.
|
||||||
|
|
||||||
|
To turn off the animation and just highlight the block and the braces, select
|
||||||
|
\preferences > \uicontrol {Text Editor} > \uicontrol Display and deselect
|
||||||
|
\uicontrol {Animate matching parentheses}.
|
||||||
|
|
||||||
|
\section1 Moving Between Blocks
|
||||||
|
|
||||||
You can use keyboard shortcuts to move within and between blocks. To go to
|
You can use keyboard shortcuts to move within and between blocks. To go to
|
||||||
block end, press \key {Ctrl+]} and to go to block start, press
|
block end, press \key {Ctrl+]} and to go to block start, press
|
||||||
@@ -101,11 +114,15 @@
|
|||||||
or beginning of the block, press \key {Ctrl+Shift+]} and
|
or beginning of the block, press \key {Ctrl+Shift+]} and
|
||||||
\key {Ctrl+Shift+[}, respectively.
|
\key {Ctrl+Shift+[}, respectively.
|
||||||
|
|
||||||
|
\section1 Selecting the Current Block
|
||||||
|
|
||||||
To select the current block, press \key Ctrl+U. A second key press extends
|
To select the current block, press \key Ctrl+U. A second key press extends
|
||||||
the selection to the parent block. To undo the last selection, press
|
the selection to the parent block. To undo the last selection, press
|
||||||
\key {Ctrl+Alt+Shift+U}. To enable smart block selection, select
|
\key {Ctrl+Alt+Shift+U}.
|
||||||
\preferences > \uicontrol {Text Editor} >
|
|
||||||
\uicontrol Behavior > \uicontrol {Enable smart selection changing}.
|
To enable smart block selection, select \preferences
|
||||||
|
> \uicontrol {Text Editor} > \uicontrol Behavior >
|
||||||
|
\uicontrol {Enable smart selection changing}.
|
||||||
|
|
||||||
\image qtcreator-options-text-editor-behavior.png "Text Editor Behavior preferences"
|
\image qtcreator-options-text-editor-behavior.png "Text Editor Behavior preferences"
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -38,6 +38,6 @@
|
|||||||
|
|
||||||
\sa {Configuring Fonts}, {File Encoding},
|
\sa {Configuring Fonts}, {File Encoding},
|
||||||
{Moving to Symbol Definition or Declaration}, {Indent text or code},
|
{Moving to Symbol Definition or Declaration}, {Indent text or code},
|
||||||
{Highlighting and Folding Blocks}, {Selecting Line Ending Style},
|
{Selecting Line Ending Style}, {Semantic Highlighting},
|
||||||
{View function tooltips}
|
{View function tooltips}
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user