Home Download Buy Blog Forum Support

Multiple cursors with keyboard: PowerCursors

Multiple cursors with keyboard: PowerCursors

Postby sankglory on Tue Apr 01, 2014 5:03 pm

PowerCursors is a Sublime Text 3 package that makes the add/remove/select of multiple cursors more convenient with keyboard.

Multiple cursors:
Image

Multiple selections:
Image

github page:
https://github.com/MaokaiLin/PowerCursors/
It's also available through PackageControl.

Multiple cursors is awesome in Sublime Text. This plugin enhances it by allowing you to add one cursor at a time. While you are trying to put the current cursor in position, the other cursors you added will remain their positions unchanged. When you are done putting all cursors in desired positions, you can activate them and start moving and editing with all of them together. You can also select and edit multiple regions this way.

Hope you like this feature, and enjoy the extra power it brings to multiple cursors!
sankglory
 
Posts: 4
Joined: Tue Apr 01, 2014 4:55 pm

Re: Multiple cursors with keyboard: PowerCursors

Postby angusyeh on Tue Apr 01, 2014 11:55 pm

This is very useful, THANK YOU! :-)
angusyeh
 
Posts: 13
Joined: Thu Jan 09, 2014 10:49 pm

Re: Multiple cursors with keyboard: PowerCursors

Postby icylace on Wed Apr 02, 2014 7:30 pm

5-stars !!!
This is indeed Incredibly useful!

I have a suggestion for the way the "remove cursor" command works. It would be nice when a cursor/selection is removed the next cursor/selection that gets activated is the one that was closest to the one that was just removed.

For example, imagine I have 3 cursors positioned in a large buffer where the first one is on the first line, the second one is on the second-to-last line, and the third one is on the last line. If I have the second cursor activated and then removed then what currently happens after that is the first cursor will become active. However, activating the third cursor instead would make more sense to me.

That being said it's a minor issue and overall this package feels very natural to use. Good job! :)
icylace
 
Posts: 48
Joined: Mon Jan 14, 2013 7:24 am

Re: Multiple cursors with keyboard: PowerCursors

Postby sankglory on Fri Apr 11, 2014 8:15 am

This is a great point. I just updated the package. It should now activate the nearest transition cursor after the current one is deleted.
sankglory
 
Posts: 4
Joined: Tue Apr 01, 2014 4:55 pm

Re: Multiple cursors with keyboard: PowerCursors

Postby icylace on Fri Apr 11, 2014 8:53 pm

Thank you, it works well when regular cursors are used.

However, there's still one more issue concerning the case when selections are used. Right now it seems that if the active cursor is closer to the end of the previous transition selection than the end of the next one then the former selection will be chosen. The problem here is that if the size of the next transition selection is very large then it's likely that the incorrect selection will be chosen. In the extreme case the active cursor could be directly within the next transition selection but the previous one will be chosen instead !

The solution here would involve taking into account the beginnings and endings of each selection.
icylace
 
Posts: 48
Joined: Mon Jan 14, 2013 7:24 am

Re: Multiple cursors with keyboard: PowerCursors

Postby sankglory on Mon Apr 14, 2014 7:40 pm

I meant to make the cursor move the least distance when it is removed. But yes, it makes more sense to activate the selection when the cursor is within it. Updated the package. Hope it's working better now.
sankglory
 
Posts: 4
Joined: Tue Apr 01, 2014 4:55 pm

Re: Multiple cursors with keyboard: PowerCursors

Postby facelessuser on Mon Apr 14, 2014 8:25 pm

Just started playing with this plugin. Seems very useful. Thanks!
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: Multiple cursors with keyboard: PowerCursors

Postby icylace on Tue Apr 15, 2014 2:31 am

Works perfectly now. Thank you !
icylace
 
Posts: 48
Joined: Mon Jan 14, 2013 7:24 am

Re: Multiple cursors with keyboard: PowerCursors

Postby Posterum on Sat May 03, 2014 6:54 pm

Ah, great plugin, thanks! :)
Posterum
 
Posts: 1
Joined: Sat May 03, 2014 6:48 pm


Return to Plugin Announcements

Who is online

Users browsing this forum: Google [Bot] and 10 guests