Home Download Buy Blog Forum Support

Multiple Selections By Keyboard

Re: Multiple Selections By Keyboard

Postby jps on Sun Oct 04, 2009 1:50 am

A mode where all non-empty selections are recorded sounds somewhat strange to me. I'd think there'd be more to be gained in improving the semantics of the dormant selection stacks, so you could make several selections, press a key to remember them, and then press another key to restore all remembered selections.

The key-press to record each selection is mostly there atm: bind a key to 'markSelection' to record each selection, then bind a key to 'sequence prevInSelectionHistory mergeSelection' to restore all recorded selections.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Multiple Selections By Keyboard

Postby jps on Sun Oct 04, 2009 6:33 am

Currently, view.insert(pt, text) returns the number of characters actually inserted, I can add another function, view.insertSnippet(pt, snippet) that will act like the command insertInlineSnippet, but it will insert where you ask it to, rather than where the selection is, and it'll return the number of characters inserted. Would this be enough?

re: an onSelectionModified callback, there's no reason not to have one, I've added it to the todo list
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Multiple Selections By Keyboard

Postby jps on Sun Oct 04, 2009 9:46 am

sublimator wrote:For that particular command (as you type insertion of snippets) undo is perfect, cause there is other state needing to be rolled back. The snippet fields seem to collect up ... even though the area containing them is erased.
...
Is using undo particularly nasty?


Ok, I guess I'll need to look at the command in more detail. Using undo like this isn't too bad, although if it means the redo stack is left populated, that's not ideal.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Next

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 6 guests