diff --git a/doc/qtcreator/src/editors/creator-code-refactoring.qdoc b/doc/qtcreator/src/editors/creator-code-refactoring.qdoc index de6d476d531..f33225aee06 100644 --- a/doc/qtcreator/src/editors/creator-code-refactoring.qdoc +++ b/doc/qtcreator/src/editors/creator-code-refactoring.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -163,19 +163,4 @@ The instances of the symbol are highlighted in code and you can edit the symbol. All instances of the local symbol are changed as you type. \endif - - \section1 Multi-Cursor Editing - - To apply a change to several places simultaneously, press and hold \key Alt, - and click to place cursors in several places. Any changes you make are - applied simultaneously at all the cursor positions. - - Use the arrow keys to move all the cursors up and down. The \key Home and - \key End key move all the cursors to the beginning or to the end of the - line. - - Press and hold \key Alt and double-click strings to select several strings - simultaneously. - - Press \key Esc to remove all the cursors and selections. */ diff --git a/doc/qtcreator/src/editors/creator-coding-edit-mode.qdoc b/doc/qtcreator/src/editors/creator-coding-edit-mode.qdoc index 60fafe368bb..51143aa16c7 100644 --- a/doc/qtcreator/src/editors/creator-coding-edit-mode.qdoc +++ b/doc/qtcreator/src/editors/creator-coding-edit-mode.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -138,6 +138,41 @@ For more information, see \l {Specifying Editor Settings}. \endif + \section1 Editing Selected Lines + + The \uicontrol Edit > \uicontrol Advanced menu contains options for editing + selected lines of text. + + To duplicate the selected lines, select \uicontrol {Duplicate Selection}. + To format the duplicated lines as a comment, select + \uicontrol {Duplicate Selection and Comment}. + + To turn selected text into lowercase, select \uicontrol {Lowercase Selection} + or press \key {Alt+U}. To turn it into uppercase, select + \uicontrol {Uppercase Selection} or press \key {Alt+Shift+U}. + + To sort selected lines alphabetically, select \uicontrol {Sort Selected Lines} + or press \key {Alt+Shift+S}. + + Select \uicontrol {Add Next Occurrence to Selection} or press \key {Ctrl+D} + to add a cursor at the next occurrence of selected text for multi-cursor + editing. + + \section1 Multi-Cursor Editing + + To apply a change to several places simultaneously, press and hold \key Alt, + and click to place cursors in several places. Any changes you make are + applied simultaneously at all the cursor positions. + + Use the arrow keys to move all the cursors up and down. The \key Home and + \key End key move all the cursors to the beginning or to the end of the + line. + + Press and hold \key Alt and double-click strings to select several strings + simultaneously. + + Press \key Esc to remove all the cursors and selections. + \section1 Splitting the Editor View Split the editor view or open the editor in a new window when you want to diff --git a/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc b/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc index 2ff220a8c23..c4830d753da 100644 --- a/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc +++ b/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc @@ -475,12 +475,19 @@ \li Switch between header and source file \li F4 \endif + \row + \li Add a cursor at the next occurrence of selected text for + multi-cursor editing + \li Ctrl+D \row \li Turn selected text into lowercase \li Alt+U \row \li Turn selected text into uppercase \li Alt+Shift+U + \row + \li Sort selected lines alphabetically + \li Alt+Shift+S \row \li Run static checks on JavaScript code to find common problems \li Ctrl+Shift+C