I would expect that I could set a persistent selection using a key modifier when selecting text.
Generally that is a valid idea.
I wouldn't use a modifier key, because we are running out of them. And if you look at the amount of keymap entries that are selection related (select-up/down/left/rigth/word/word-end|begin.... And again for column mode...) => far too many.
But I could imagine any of the following (including several or all of them)
- ctrl-k, b to always make a persistent selection (Note, you can assign what ever key you like)
- Having a key that you can press once you made a selection: "make the current selection persistent"
- (maybe?) Having a key that you can press immediately before you make a selection (expires on any non-selecting action)
- Having a key to toggle the global option (or 2 keys, for on/off each)
The 3rd one doesn't appeal to much to me....
Please feel free to file a feature request on the issue tracker.
Then be able to move the caret and type anywhere etc. But I would expect that I should still be able to make a new text selection(and the persistent one would be temporarily deselected) then do what i want with that selection, when there is no more selected text the persistent selection comes back.
There is only one selection.
So a persistent selection will not come back after another selection had been made....
Also I personally would not feel that this is intuitive. But even if I would read "persistent" as surviving a temp-selection, then I would expect it to be visible all the time. And just ctrl-c to act on the last made selection....
But anyway, I don't think that is going to happen...
I could imagine a bookmark inspired feature, but rather than name bookmarks using a stack. And then on that stack store the current caret-pos, and current (if existing) selection. So then you can do
- save(push) caret/selection
- do work (if need saved x/y will be amended)
- pop
Though not directly implemented as a new command. Rather extend PascalScript Editor Macros. Provide them with a persistent storage that allows each macro to store values between invocation (and share with other macros).
Then a macro as the above could be implemented...