Sublime Forum

How could I set a mark with keybinding `Ctrl+space` on Sublime Text?

#1

On emacs by default Ctrl+space sets a mark and later when I press up/down arrow the selection expands.

I am using emacs keybindings on Sublime Text via Emacs Pro Essentials.
But on Sublime Text, I need to do Ctrl+space+space in order to set a mark. First space puts a dot next the line and the seconds space actually selects it.

[Q] How could I set a mark with keybinding Ctrl+space on Sublime Text`?

0 Likes

#2

I think you have another keybinding that’s interfering with the Emacs package. Currently I can hit C-space and set mark, and then move cursors to start defining a region.

However the strange need to doublestrike space rings a bell from several years ago and I think the issue was conflicting keybinds. You might be able to do the following:

sublime.log_commands(True)
sublime.log_input(True)

And see what you get. For example this is what I see when I go to the beginning of a line, drop mark, then go down 3 lines and drop mark again (i.e. C-a, C-space, C-n, C-n, C-n, C-space)

key evt: control+a
command: move_to {"extend": false, "to": "hardbol"}
key evt: control+space
command: sbp_set_mark
key evt: control+n
command: move {"by": "lines", "forward": true}
plugin rewritten command: move
key evt: control+n
command: move {"by": "lines", "forward": true}
plugin rewritten command: move
key evt: control+n
command: move {"by": "lines", "forward": true}
plugin rewritten command: move
key evt: control+space
command: sbp_set_mark

Hopefully that will help you figure out what’s going on.

1 Like

#3

Thank you @Remi

I am able to solve this issue by:

"sbp_active_mark_mode" : true, 
{"keys": ["ctrl+g"], "command": "sbp_quit", "args": {"favor_side": "end"}}

Please see the realted thread: https://github.com/sublime-emacs/sublemacspro/issues/193#issuecomment-579248397

1 Like

#5

Delete a block- hit ctrl+shit+space until you covered the block you want to remove, then delete.

0 Likes