How to set a region with emacs key binding in Komodo IDE 11?

Usually, with emacs, setting a region is done via setting a mark (Ctrl-space) at the beginning of your target section, moving the cursor to the end of the target section, and that is the region, which would then be used with commands like Meta-W, Ctrl-W for copy/cut, and then the usual Ctrl-Y will paste it in.

I’ve tried using Ctrl-space as well as highlighting the lines, and in all cases a Ctrl-W or even a Meta-W will go from the start of the file to the current cursor location for the region. Is there a different way to do it with Komodo? I have not found anything on actually setting the region in the documentation or via web searches. I’m assuming I’m missing something, and that this isn’t a bug. Am I wrong?

Using Komodo IDE 11:
Komodo IDE, version 11.0.2, build 90813, platform macosx

Hi, I am not able to reproduce this problem. I start with the following buffer:

foo
bar
baz
quux

I move to the beginning of the second line (before “bar”) and press Ctrl+Space. Commando notifies me that a transient mark was set. Then I move two lines down to the position before “quux” and press Ctrl+W. I am left with the expected:

foo
quux

I can also put transient marks in the middle of lines and cut to middles of lines.

Hmm. Thanks very much for trying that so quickly and responding!

That’s the issue for sure then. I press ctrl-space and I don’t get the “transient mark was set”. I assume that shows in the bottom line with fairly default setup? Every other binding I’ve tried with the emacs works EXCEPT the ctrl-space. Even Ctrl-X 2 to split the window, which is one of the more esoteric ones. Not even sure how I can try to fix this. I’ve tried altering the bindings to Mac OS X/Default and back with no effect. Anything else I can try? Just under an evaluation license at present, but if I can sort this out, it’s going to become the go-to editor for this work.

Hi, you can try going to Edit > Preferences > Key Bindings and then search in the box for “set mark”. Click on “Editor: Set Mark” and make sure it is set to Ctrl+Space. You can also try changing it to something else via the textboxes and buttons below – it’s possible that Ctrl+Space is handled strangely on Mac.

I think this might be a Mac issue. Or maybe a Mac + Komodo issue. I tried to see what, if anything, was set with Ctrl + Space. When I do that key combination Komodo detects Ctrl + ` (that’s a back tic).

I’ve now set the command Set Mark to Ctrl + Space manually (which is detected as Ctrl + `) but it still doesn’t work, though I DO see Transient mark set in the notifications.

EDIT: It is working. I’m just dumb. I forgot to press Left or Right to move the selection. So you need to manually set the keybinding to get this working.

  • Carey
1 Like

That worked! Thanks very much! Feels pretty much like emacs now. More than any other non-emacs editor ever has.

Yes, careyh noted that it seems to show up as ctrl-` on the mac. No idea what’s causing that in the mapping. Setting it deliberately by typing ctrl-space and having it fill in ctrl-` worked