Categories


Popular topics

Line 1: Line 1:
 
[[Category:General]]
 
[[Category:General]]
 
[[File:UltraEdit multi-caret.png|right|alt=screenshot of UltraEdit's multi-caret editing feature]]
 
[[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 may be disabled completely  under [[Settings:Editor display:Cursor/caret|Settings » Editor display » Cursor/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 may 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 editing is not supported in [[column mode]] or [[hex edit]] mode.

Revision as of 21:09, 17 April 2019

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 may be disabled completely under 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 may 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

Adding a new caret to an existing set via mouse

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.

Removing a caret via mouse

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.

Clearing all multiple carets via mouse

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 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 Ctrl 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 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.

Removing a selection via mouse

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.

Clearing all multiple selections via mouse

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.

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 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.

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
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.

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.

"End of line" carets

Special handling is provided for multiple contiguous "end of line" (EOL) carets. This allows you to first create a regular selection of multiple lines then hold Ctrl and click beyond one of the selected lines' EOL to dismiss the selection and create a caret at the end of each line. This way, you don't have to manually Ctrl + Click to insert multiple carets at the end of each line.

MediaWiki spam blocked by CleanTalk.