Here’s a partial answer, which largely includes the mistakes that I have made during this process. The keyboard remap has taken me roughly 2 days, and I’m probably going to have to have another go, because I’ve realised a major flaw in my methodology.
Hopefully some of this will be useful to anyone else who has to go through this process, ie starts using ST on Linux and then one day moves over to Windows and finds that there are less modifier keys, don’t make the mistakes I made !
Job:
- Went through all the default key bindings to see if there were any keys spare.
- Then went through all my key bindings using the super key (there was about 80 ish) and ‘collected’ them into rough categories, which turned out to be for me (E)ditor, (F)ile, (C)omment/Code, (G)it, (I)nsert, (N)avigation and (X)tra.
-
Nooped those keys (maybe unneccassary) eg:
{ "keys": ["ctrl+x"], "command": "noop" }
Here’s possibly my largest mistake, I thought I’ve really only got ctrl,shift and alt to use. From the initial keypress there’s only ctrl and alt. (Shift + a letter just gives a capital letter!). So I thought I’ll re-map using ctrl E,F,C,G,I,N,X and a secondary (or tertiary) keypress and remap the original keys to the new sub group.
For example:
Original Use Ctrl+e: I don’t really use that key combo, so I can ‘loose’ that key to the new system.
Original Use Crtl+c: Copy -> becomes the Comment/Code master key so it (Ctrl+c) gets remapped to Editor Copy, Ctrl+e, Ctrl+c
Original Use Ctrl+x: Cut -> becomes the Xtra master key so it gets remapped to Editor Cut, Ctrl+e,Ctrl+x
New Use Ctrl+x, Ctrl (+ Shift/Alt) (ie other key combination) handles hide error messages after build (Ctrl+x,Ctrl+h) or
{"keys": ["ctrl+x","shift+ctrl+m"], "command": "toggle_minimap"},
{"keys": ["ctrl+x","ctrl+tab"], "command": "focus_exec_panel"},
Ctrl+c now includes:
{ "keys": ["ctrl+c", "ctrl+m", "ctrl+c"], "command": "run_macro_file", "args": {"file": "res://Packages/User/moveComment.sublime-macro"} },
{ "keys": ["ctrl+c", "ctrl+d", "ctrl+c"], "command": "run_macro_file", "args": {"file": "res://Packages/User/deleteNextCommentSymbol.sublime-macro"} },
The Mistake, put most simply, is don’t use the ctrl key as the first key press, use the alt key. I haven’t checked but there maybe more default alt keys free for a start.
Key presses like Ctrl+c,x (Copy Cut) and Ctrl+f (for Find) (which is now Ctrl+e,Ctrl+f) are really deeply ingrained and using the new keybindings for only ST where the rest of everything uses the afore mentioned keys is (as we say in my part of the world) a total Nalls (a bit crap).
Plus I forgot about Ctrl+n (and other keys) for had to remap them (Ctrl+f,Ctrl+n)
If you’ve got this far:
- Reassign all the keys.
- Weep (Gratitude/Shame).
Some good has come of all this, I’ve gone through and re-organised my User Keymap (for windows) (my Linux one is still a mess) and re-familiarised myself with some keybindings, made some better, added context, etc.
My advice, if you can do it right first time, do.
If anyone’s got anything to add (other than I’m an m*ron, which hey fair enough) maybe we can save a few folks some pain…
This evening’s job is to remap using the alt key and not ctrl