PowerCursors is a Sublime Text package that makes the add/remove/select of multiple cursors more convenient with keyboard.
You can easily add a cursor and move it around while keeping all other cursors static. You can also choose between these cursors and remove them. When you are done putting cursors in positions, you can activate them and start moving and editing with all of them.
This is a fork of https://github.com/MaokaiLin/PowerCursors with the following changes:
- The region/selection style is configurable as view setting. E.g. in the standard
Preferences.sublime-settings
file:
"power_cursors_style": {
"flags": "outline",
"scope": "region.redish",
"icon": "dot",
}
-
The number of selections/virtual cursors is shown in the status bar
-
The plugin runs on python3.8 and doesn't ship with any default key-bindings anymore. See below for what you should do.
Some bug-fixes of course.
Install PowerCursors for Sublime Text
Using Package Control:
- Run
Package Control: Install Package
command. - Search for
PowerCursors
and install. - Restart Sublime Text.
- Enjoy the extra power of multiple cursors!
Clone repository into Packages directory (can be found using Preferences: Browse Packages
command in Sublime Text)
git clone git://github.com/kaste/PowerCursors.git
No key-bindings are installed. You have to define your own!
For that open Preferences: Key Bindings
. Look at and maybe copy-paste the bindings for Windows/Linux or Mac.
There are 6 commands in PowerCursors:
-
It adds a cursor and enters a transition mode where you can move the active cursor around without affecting the position of the cursor you just added.
The command is
power_cursor_add
. -
It removes the currently active cursor and activates the cursor right before the current cursor (position-wise).
The command is
power_cursor_remove
. -
It makes the currently active cursor static and activates the cursor right before/after the current cursor (position-wise).
It also works when you already have multiple cursors. It makes all cursors static and activates only the last/first cursor. Now you are free to move only one of the cursors, or remove some of them without affecting the rest.
The command is
power_cursor_select
, with an argument "forward" being eithertrue
orfalse
. -
It activates all cursors. Now when you move or edit, all cursors will respond, just like how the native multiple-cursor works in Sublime Text.
The command is
power_cursor_activate
. -
It exits the cursor transition status. All cursors you added will be removed and the normal cursor mode is resumed.
The command is
power_cursor_exit
.
All the commands above also work for selections. For example, after selecting one region, you can add a new cursor and select a different region while keeping the one you chose before intact. You can select multiple regions this way, then activate all and replace texts in them. Feel free to explore more usage of the commands. They are quite robust and adaptable.
This software is released under the terms of the MIT license.