diff --git a/doc/qtcreator/images/qtcreator-editor-settings.png b/doc/qtcreator/images/qtcreator-editor-settings.png index 0c5265a6a2f..2ad6d12e217 100644 Binary files a/doc/qtcreator/images/qtcreator-editor-settings.png and b/doc/qtcreator/images/qtcreator-editor-settings.png differ diff --git a/doc/qtcreator/images/qtcreator-options-text-editor-display.png b/doc/qtcreator/images/qtcreator-options-text-editor-display.png new file mode 100644 index 00000000000..d49884ae624 Binary files /dev/null and b/doc/qtcreator/images/qtcreator-options-text-editor-display.png differ diff --git a/doc/qtcreator/src/editors/creator-code-indentation.qdoc b/doc/qtcreator/src/editors/creator-code-indentation.qdoc index 716c5cec20c..f23e5b48502 100644 --- a/doc/qtcreator/src/editors/creator-code-indentation.qdoc +++ b/doc/qtcreator/src/editors/creator-code-indentation.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -48,6 +48,29 @@ \li Other text files \endlist + To fix the indentation in the file currently open in the editor, + select options in the \uicontrol Edit > \uicontrol Advanced menu + or use \l{Keyboard Shortcuts}{keyboard shortcuts}: + + \list + \li To automatically indent the highlighted text, select + \uicontrol {Auto-indent Selection} or press \key {Ctrl+I}. + \li To automatically format the highlighted text, select + \uicontrol {Auto-format Selection} or press \key {Ctrl+;}. + \li To adjust the wrapping of the selected paragraph, select + \uicontrol {Rewrap Paragraph} or press \key {Ctrl+E} + followed by \key R. + \li To toggle text wrapping, select \uicontrol {Enable Text Wrapping} + or press \key {Ctrl+E} followed by \key {Ctrl+W}. + \li To visualize whitespace in the editor, select + \uicontrol {Visualize Whitespace} or press \key {Ctrl+E} + followed by \key {Ctrl+V}. + \li To clear all whitespace characters from the currently open file, + select \uicontrol {Clean Whitespace}. + \endlist + + \section1 Specifying Indentation Settings + 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. @@ -61,7 +84,20 @@ \image qtcreator-options-text-editor-behavior.png "Text Editor Behavior options" + To visualize whitespace in the editor, select \uicontrol Tools > + \uicontrol Options > \uicontrol {Text Editor} > \uicontrol Display > + \uicontrol {Visualize whitespace}. + + \image qtcreator-options-text-editor-display.png "Text Editor Display options" + + To help you keep line length at a particular number of characters, set the + number of characters in the \uicontrol {Display right margin at column} + field. To use a context-specific margin when available, select the + \uicontrol {Use context-specific margin} check box. \if defined(qtcreator) + For example, the margin could be set by the \c ColumnLimit option of the + \l{Specifying Code Style Settings}{Clang Format plugin}. + \section1 Indenting C++ Files To specify indentation settings for the C++ editor: diff --git a/doc/qtcreator/src/editors/creator-semantic-highlighting.qdoc b/doc/qtcreator/src/editors/creator-semantic-highlighting.qdoc index 728936dec27..0545c133138 100644 --- a/doc/qtcreator/src/editors/creator-semantic-highlighting.qdoc +++ b/doc/qtcreator/src/editors/creator-semantic-highlighting.qdoc @@ -101,6 +101,8 @@ \uicontrol {Text Editor} > \uicontrol Display > \uicontrol {Display folding markers}. This option is enabled by default. + \image qtcreator-options-text-editor-display.png "Text Editor Display options" + 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 \uicontrol Tools > \uicontrol Options > \uicontrol {Text Editor} > @@ -117,4 +119,6 @@ \key {Ctrl+Alt+Shift+U}. To enable smart block selection, select \uicontrol Tools > \uicontrol Options > \uicontrol {Text Editor} > \uicontrol Behavior > \uicontrol {Enable smart selection changing}. + + \image qtcreator-options-text-editor-behavior.png "Text Editor Behavior options" */