Sublime Forum

Keyboard shortcut to go to beginning/end of line?

#21

By overwriting I mean that I write a new mapping for an existing key combo, instead of there being a preference that sets the behavior. I didn’t find the cmd-left in the default key bindings, so I was thinking there might be a preference for it instead.

0 Likes

#22

Ahh gotcha; although the default bindings indeed set the defaults, there are various bindings that you may not find in there that seem to be what you might consider “OS level defaults” that you would expect to work in all applications.

Presumably that happens across all platforms though I’ve only ever experienced it when looking for MacOS key bindings, where the physical lack of keys that’s expected on some mac keyboards are not fully reflected. It still works to bind such a key even though it doesn’t appear in the defaults, though.

0 Likes

#23

Thank you for this discussion. I was trying to find a way to put the curser in front/back of the line. However, I also wanted an option to highlight from a point within a line to front/back to delete unnecessary clutter. If anyone else needs a similar option I came up with the following below. Also, if this was already an option please let me know.

Note: This was for a windows machine.

{ “keys”: [“ctrl+alt+left”], “command”: “move_to”, “args”: {“to”: “bol”, “extend”: false} },
{ “keys”: [“ctrl+alt+right”], “command”: “move_to”, “args”: {“to”: “eol”, “extend”: false} },
{ “keys”: [“ctrl+shift+left”], “command”: “move_to”, “args”: {“to”: “bol”, “forward”: false, “extend”: true} },
{ “keys”: [“ctrl+shift+right”], “command”: “move_to”, “args”: {“to”: “eol”, “forward”: true, “extend”: true} },

0 Likes

#24

Those are the default key bindings for the home and end keys, with and without shift

0 Likes