Sublime Forum

OSX: Make Ctrl+A do like Command+Left

#1

On OSX, Command+Left goes to the first non-whitespace character on a line, when invoked again it goes to the beginning of the line. Ctrl+A always goes to the beginning of the line.

I couldn’t find any binding for Command+Left (nor Ctrl+A for that matter) in Default/Default (OSX).keymap, so I don’t know where to look.

0 Likes

#2

sublime.log_commands(True) did the trick: I executed that in the console, then hit Ctrl+A and hit Super+Left and could see the difference. Then I added the following entries to Packages/User/Default (OSX).sublime-keymap, and Bob was my uncle.

	{ "keys": "ctrl+a"], "command": "move_to", "args": {"to": "bol"}},
	{ "keys": "ctrl+e"], "command": "move_to", "args": {"to": "eol"}}
0 Likes