
Yet there are more exciting actions that work with multiple cursors as well: Complete Statement: Ctrl+Shift+Enter (Lin/Win) or ⇧⌘⏎ (macOS).Move caret to line end/start: Home / End (Lin/Win) or ⌘ -> / / / / / / Lots of editing actions work nicely with multiple cursors: If you wish to select all occurrences at once, press Shift+Ctrl+Alt+J (Lin/Win) or ^⌘G (macOS). Press Alt+J (Lin/Win) or ^G (macOS) to add the next occurrence of the current word to the selection press Shift+Alt+J (Lin/Win) or ⇧^G (macOS) to remove one.įirst option works in the situations like in the following example:Īnd second one can be handy in the case like below: Another way to get multiple cursors in a file is to add repeating occurrences.When you want to go back to single-cursor mode, just press Esc.Īnother way it to press Ctrl (Lin/Win) or ⌥ (macOS) twice then hold down and move up/down, that could be useful for items that are aligned. To add/remove a caret, press Alt+Shift and select cursor locations with the mouse.This works for all the languages supported in CLion, including C, C++, CMake scripting, JavaScript, XML, HTML, Python, Swift and more. The idea is simple – you put the caret in several different places in a file and start editing all of them at once.

WEBSTORM MULTIPLE CURSORS FROM SELECTION CODE
We’ll also identify some scenarios when it’s better to go with refactorings or code generation instead.

In this blog post, we are going to explain how CLion can help you do this with its multiple cursors feature. For example, having code appear simultaneously in multiple places can come in handy. Sometimes effectiveness is how quickly you can type.
