Hi,
Please can I have some advice about a plugin I’ve written.
The plugin is called Multiple Selection Scroller and it allows users to scroll through their current multiple selections. It has the following capabilities:
Scroll to selection commands - center chosen selection on the middle line:
-
Scroll to previous selection
*] Scroll to next selection -
Scroll to first selection
-
Scroll to last selection
Clear to selection commands - clear all selections leaving a single cursor at:
-
Clear to first selection
-
Clear to last selection
-
Clear to selection on, or nearest to, the middle line
/*:m]
Each of the ‘scroll to’ and ‘clear to’ commands require a key assignment. Here’s what I am currently using:
Note: The **** and ] keys are already used for line indenting and code folding, using them for multi-selection scrolling and clearing in various key combinations seems both convenient and appropriate.
Linux/Windows keymapping
------------------------
Description Arg Value Keys
--------------------------------------------------------------------------------------
Scroll to previous selection (backwards) scroll_to previous alt+
Scroll to next selection (forwards) scroll_to next alt+]
Scroll to first selection scroll_to first alt+k, alt+
Scroll to last selection scroll_to last alt+k, alt+]
--------------------------------------------------------------------------------------
Clear to first selection clear_to first ctrl+k, ctrl+
Clear to last selection clear_to last ctrl+k, ctrl+]
Clear to selection (on/nearest) middle line clear_to middle ctrl+k,
(No modifier for '')
--------------------------------------------------------------------------------------
With 7 key commands I am worried that it is over complicated. I could easily provide 4 commands in the .sublime-keymap
files by keeping only:
-
Scroll to previous selection
-
Scroll to next selection
-
Clear to last selection
-
Clear to selection on, or nearest to, the middle line
Users could add the rest of the functionality if they want and I could provide a sample keys file to help those inclined to do so. But Sublime Texters are used to remembering keys and the whole design philosophy of the editor is that it is quickest to perform tasks with the keyboard. I guess it is a decision based on whether functionality is more important than ease of use.
I’d like to hear your thoughts on the matter please.
ALSO…
Ideas from OS X users about what keys to use for OS X would be helpful. I know the Option/Alt key is a no-go according to the ST help pages because Option+ inserts non-ascii characters. I’ve never really used OS X so am hesitant to decide on keys without advice on the matter.
Many thanks all.