From eccbff7698557ff4706ab21890b4fb044ff3a9c1 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 18 Oct 2023 17:11:12 +0200 Subject: [PATCH] Doc: Describe Tools > C++ > Fold/Unfold All Comment Blocks Task-number: QTCREATORBUG-29392 Change-Id: Ie92253165b5004455be6f7dd8e031431c4358dae Reviewed-by: Eike Ziller --- .../src/editors/creator-editors-options.qdoc | 5 ++- .../creator-semantic-highlighting.qdoc | 33 ++++++++++++++----- .../creator-projects-settings-editor.qdoc | 2 +- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/doc/qtcreator/src/editors/creator-editors-options.qdoc b/doc/qtcreator/src/editors/creator-editors-options.qdoc index e17a11c8a98..595c79b81c3 100644 --- a/doc/qtcreator/src/editors/creator-editors-options.qdoc +++ b/doc/qtcreator/src/editors/creator-editors-options.qdoc @@ -57,9 +57,8 @@ \li Set \l{Indent text or code}{tabs, indentation, the handling of whitespace, and mouse operations} in \uicontrol Behavior. - \li Set various display properties, such as - \l{Highlighting and folding blocks} - {highlighting and folding blocks} or text + \li Set various display properties, such as \l{Highlighting Blocks} + {highlighting} or \l{Folding Blocks}{folding} blocks or text wrapping in \uicontrol Display. \li Add, modify, and remove \l{Editing Code Snippets}{code snippets} in diff --git a/doc/qtcreator/src/editors/creator-semantic-highlighting.qdoc b/doc/qtcreator/src/editors/creator-semantic-highlighting.qdoc index e6d119bb818..23dfc01a4f0 100644 --- a/doc/qtcreator/src/editors/creator-semantic-highlighting.qdoc +++ b/doc/qtcreator/src/editors/creator-semantic-highlighting.qdoc @@ -69,7 +69,7 @@ apply the changes you make to the definition files, select \uicontrol {Reload Definitions}. - \section1 Highlighting and Folding Blocks + \section1 Highlighting Blocks 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 @@ -80,6 +80,8 @@ To enable block highlighting, select \preferences > \uicontrol {Text Editor} > \uicontrol Display > \uicontrol {Highlight blocks}. + \section1 Folding Blocks + 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, 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" - 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}. + \section2 Folding All Comment Blocks + + To fold all comment blocks, select \uicontrol Tools > \uicontrol C++ > + \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 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 \key {Ctrl+Shift+[}, respectively. + \section1 Selecting the Current Block + 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 - \key {Ctrl+Alt+Shift+U}. To enable smart block selection, select - \preferences > \uicontrol {Text Editor} > - \uicontrol Behavior > \uicontrol {Enable smart selection changing}. + \key {Ctrl+Alt+Shift+U}. + + 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" */ diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-editor.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-editor.qdoc index 384874405a7..ba622d8b2ae 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-editor.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-editor.qdoc @@ -38,6 +38,6 @@ \sa {Configuring Fonts}, {File Encoding}, {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} */