(Created page with "Category:General") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:General]] | [[Category:General]] | ||
+ | [[File:UltraEdit multi-caret.png|right|alt=screenshot of UltraEdit's multi-caret editing feature]] | ||
+ | Multi-caret editing allows you to activate two or more non-contiguous insertion points (identified by the blinking caret) within the active file. Each caret acts and operates independently of any other caret, and most edit operations you execute are performed in all caret locations simultaneously. This is an optional feature and can be disabled completely under [[Settings:Editor display:Cursor / caret|Settings » Editor display » Cursor / caret]]. | ||
+ | |||
+ | Multi-caret editing is not supported in [[column mode]] or [[hex edit]] mode. | ||
+ | |||
+ | ==Multi-caret via mouse== | ||
+ | |||
+ | ===Creating multiple carets via mouse=== | ||
+ | Regardless of how many carets are active, you can add a new caret by holding the <strong>Ctrl</strong> key and <strong>left-mouse-button clicking</strong> at any location within the file where you can normally click to reposition the caret, including beyond a line end if "Allow positioning beyond line end" is set under [[Settings:Editor display:Cursor / caret|Settings » Editor display » Cursor / caret]] | ||
+ | |||
+ | ===Adding a new caret to an existing set via mouse=== | ||
+ | If you have created a caret set and released <strong>Ctrl</strong> and wish to add a new caret to the active set, then, prior to clicking anywhere else in the file, you can press <strong>Ctrl</strong> again and click in a new position to add a new caret to the existing set. | ||
+ | |||
+ | ===Removing a caret via mouse=== | ||
+ | You may remove a caret from the active set by holding <strong>Ctrl</strong> and clicking on the caret you wish to remove. No other carets are affected. You can also undo the last-added caret by pressing <strong>Shift</strong> + <strong>Alt</strong> + <strong>Z</strong>. | ||
+ | |||
+ | ===Clearing all multiple carets via mouse=== | ||
+ | To remove multiple carets, you can release <strong>Ctrl</strong> and then click elsewhere in the file (not on an active selection). All carets will be removed and the clicked position will become the only active caret. Alternatively, you can press <strong>Ctrl</strong> + <strong>Shift</strong> + <strong>/</strong> to remove all but the primary caret. | ||
+ | |||
+ | ==Multi-select via mouse== | ||
+ | |||
+ | Multi-select is a component of multi-caret in that it allows you to select multiple non-contiguous sections of data. | ||
+ | |||
+ | ===Creating multiple selections via mouse=== | ||
+ | Regardless of how many selections are active, you can add a new selection by holding the <strong>Ctrl</strong> key and selecting any text within the file where you can normally do so. | ||
+ | |||
+ | The selection can be created via: | ||
+ | |||
+ | * Click-and-drag (standard selection) | ||
+ | * Double-/triple-click | ||
+ | * Click on line number | ||
+ | |||
+ | ===Adding a new selection to an existing set via mouse=== | ||
+ | If you create a set of multiple selections and have released <strong>Ctrl</strong> and wish to add a new caret / selection to the active set, then, prior to clicking anywhere else in the file, you can press <strong>Ctrl</strong> again and select new text to add to the existing set. | ||
+ | |||
+ | ===Removing a selection via mouse=== | ||
+ | You can remove a selection from the active set by holding <strong>Ctrl</strong> and clicking anywhere on the selection you want to remove. No other selections are affected. No caret is left where you clicked. | ||
+ | |||
+ | ===Clearing all multiple selections via mouse=== | ||
+ | To remove multiple selections, you must release <strong>Ctrl</strong> and then click elsewhere in the file (not on an active caret / selection). All carets will be removed and the clicked position will become the only active caret. | ||
+ | |||
+ | ==Multi-select strings== | ||
+ | |||
+ | ===Select all occurrences of string=== | ||
+ | You can use multi-caret editing to quickly select all occurrences of a word regardless of its position in the file. To do this, make your selection and press '''Ctrl ,''' (comma). If no selection exists, the editor will select all occurrences of the word under the active caret. | ||
+ | |||
+ | ===Select next occurrence of string=== | ||
+ | To select the next occurrence of the selected string, press '''Ctrl ;''' (semicolon). If no selection exists, the editor will first select the word under the caret, and subsequent keypresses will select subsequent occurrences. | ||
+ | |||
+ | ===Select all Find matches=== | ||
+ | You can also load all matches from a search into multiple selections. To do this, first do a [[Quick find]] or [[Find]] with "Highlight all items found" enabled. After the matched items are highlighted, press '''Ctrl ,''' (comma) to load them into selections. When combined with [[Perl regular expressions]], this provides you with a very powerful way of selecting multiple different strings all at once. | ||
+ | |||
+ | ==Movement of multi-carets== | ||
+ | With a caret / selection set active, you can reposition them as you normally would by using basic movement keys on the keyboard. For example, pressing <strong>Left Arrow</strong> will move all carets to the left 1 position. Pressing <strong>Down Arrow</strong> will move all carets down 1 line. Pressing the <strong>Home</strong> key will move all carets to the beginning of each line. <strong>Page Up</strong> will move all carets up 1 page. Any movement which would cause the carets to converge into a unified location will result in a single caret. Examples include <strong>Ctrl + Home</strong>, <strong>Ctrl + End</strong>, <strong>Ctrl + Shift + Home</strong>, <strong>Ctrl + Shift + End</strong>, etc. | ||
+ | |||
+ | ==General editing with multi-caret== | ||
+ | Once you have a set of multi-carets and / or selections, you can do any number of general editing operations. | ||
+ | |||
+ | '''Copy/Cut'''<br> | ||
+ | All selections are copied or cut into the clipboard. Non-contiguous selections are separated on the clipboard by a line terminator. | ||
+ | |||
+ | If "Enable copy/cut of current line with no selection active" is set under [[Settings:Editor:Miscellaneous|Settings » Editor » Miscellaneous]], then all lines where a non-selection caret is active are copied / cut. | ||
+ | |||
+ | '''Paste'''<br> | ||
+ | All selections are overwritten with whatever data is on the clipboard, with '''one notable exception:''' if the number of line endings on the clipboard equals the number of active carets in the file, then each individual line on the clipboard will be inserted into each individual caret/selection, in respective order. This is helpful in cases where you wish to copy a plain text list into a pre-formatted code container, for example. | ||
+ | |||
+ | '''Select'''<br> | ||
+ | Using <strong>Shift</strong>, you can select from each caret at once just as you would with a single caret. | ||
+ | |||
+ | '''Backspace / delete'''<br> | ||
+ | All backspace / delete functionality is available and operates independently upon each caret. |
Multi-caret editing allows you to activate two or more non-contiguous insertion points (identified by the blinking caret) within the active file. Each caret acts and operates independently of any other caret, and most edit operations you execute are performed in all caret locations simultaneously. This is an optional feature and can be disabled completely under Settings » Editor display » Cursor / caret.
Multi-caret editing is not supported in column mode or hex edit mode.
Regardless of how many carets are active, you can add a new caret by holding the Ctrl key and left-mouse-button clicking at any location within the file where you can normally click to reposition the caret, including beyond a line end if "Allow positioning beyond line end" is set under Settings » Editor display » Cursor / caret
If you have created a caret set and released Ctrl and wish to add a new caret to the active set, then, prior to clicking anywhere else in the file, you can press Ctrl again and click in a new position to add a new caret to the existing set.
You may remove a caret from the active set by holding Ctrl and clicking on the caret you wish to remove. No other carets are affected. You can also undo the last-added caret by pressing Shift + Alt + Z.
To remove multiple carets, you can release Ctrl and then click elsewhere in the file (not on an active selection). All carets will be removed and the clicked position will become the only active caret. Alternatively, you can press Ctrl + Shift + / to remove all but the primary caret.
Multi-select is a component of multi-caret in that it allows you to select multiple non-contiguous sections of data.
Regardless of how many selections are active, you can add a new selection by holding the Ctrl key and selecting any text within the file where you can normally do so.
The selection can be created via:
If you create a set of multiple selections and have released Ctrl and wish to add a new caret / selection to the active set, then, prior to clicking anywhere else in the file, you can press Ctrl again and select new text to add to the existing set.
You can remove a selection from the active set by holding Ctrl and clicking anywhere on the selection you want to remove. No other selections are affected. No caret is left where you clicked.
To remove multiple selections, you must release Ctrl and then click elsewhere in the file (not on an active caret / selection). All carets will be removed and the clicked position will become the only active caret.
You can use multi-caret editing to quickly select all occurrences of a word regardless of its position in the file. To do this, make your selection and press Ctrl , (comma). If no selection exists, the editor will select all occurrences of the word under the active caret.
To select the next occurrence of the selected string, press Ctrl ; (semicolon). If no selection exists, the editor will first select the word under the caret, and subsequent keypresses will select subsequent occurrences.
You can also load all matches from a search into multiple selections. To do this, first do a Quick find or Find with "Highlight all items found" enabled. After the matched items are highlighted, press Ctrl , (comma) to load them into selections. When combined with Perl regular expressions, this provides you with a very powerful way of selecting multiple different strings all at once.
With a caret / selection set active, you can reposition them as you normally would by using basic movement keys on the keyboard. For example, pressing Left Arrow will move all carets to the left 1 position. Pressing Down Arrow will move all carets down 1 line. Pressing the Home key will move all carets to the beginning of each line. Page Up will move all carets up 1 page. Any movement which would cause the carets to converge into a unified location will result in a single caret. Examples include Ctrl + Home, Ctrl + End, Ctrl + Shift + Home, Ctrl + Shift + End, etc.
Once you have a set of multi-carets and / or selections, you can do any number of general editing operations.
Copy/Cut
All selections are copied or cut into the clipboard. Non-contiguous selections are separated on the clipboard by a line terminator.
If "Enable copy/cut of current line with no selection active" is set under Settings » Editor » Miscellaneous, then all lines where a non-selection caret is active are copied / cut.
Paste
All selections are overwritten with whatever data is on the clipboard, with one notable exception: if the number of line endings on the clipboard equals the number of active carets in the file, then each individual line on the clipboard will be inserted into each individual caret/selection, in respective order. This is helpful in cases where you wish to copy a plain text list into a pre-formatted code container, for example.
Select
Using Shift, you can select from each caret at once just as you would with a single caret.
Backspace / delete
All backspace / delete functionality is available and operates independently upon each caret.