mawww / kakoune

mawww's experiment for a better code editor
http://kakoune.org
The Unlicense
9.92k stars 714 forks source link

Mouse chording #610

Closed rennis250 closed 7 years ago

rennis250 commented 8 years ago

This may seem to be a strange request for an editor that is so heavily focused on the keyboard, but for some tasks, mouse chording can be much faster. It is beautifully implemented in the Acme text editor (http://acme.cat-v.org/mouse), for instance. It may sound a bit strange and complicated at first, but it is extremely efficient when you want to do lots of little copy-paste actions. Considering that mouse support is already available, I imagine this wouldn't be a huge add-on and could reuse the present keyboard-based copy-paste system.

Best, Rob

lenormf commented 8 years ago

Sounds good, it would be nice to experiment with.

rennis250 commented 8 years ago

I for one would be happy to see this. It would then be as if Acme and Vim had finally merged into a coherent system with a fresh take on keyboard navigation with selections being the primary object. I've used both Acme and Vim exclusively for extended periods of time and always missed features of one or the other.

doppioandante commented 8 years ago

Even more than chording I think it would be fun to adapt the acme plumbing to kakoune.

rennis250 commented 8 years ago

How hard would it be to add hooks for mouse events, just as there are hooks for the keyboard events? That, plus a little kak script that runs xdg-open or something similar, could put us in the same ballpark as Acme/sam's functionality.

mawww commented 8 years ago

Adding hooks would not be hard, actually we already emit them, (through NormalKey for example), whats missing is just an encoding scheme to represent the mouse events as text.

mawww commented 8 years ago

as of abd5afe0129abad0fec6799fc7329a0ca38c1e45 mouse events should be reported in a useable way. using the following format <mouse:event_name[:line.column]> with event name being move, press, release, wheel_down or wheel_up. We are still missing support for multiple buttons.

rennis250 commented 8 years ago

Wow, that was quick. Very cool. Thanks for that. Perhaps, I can throw a small script for "plumbing" together over the next day or so.

dumblob commented 8 years ago

Well, there is an increasing number of desktops having more than one pointers used on the screen simultaneously (e.g. a notebook touch screen with multiple cursors and at the same a touchpad and an external mouse).

Please consider supporting multiple mouse cursors in the textual protocol.

Thanks.

mawww commented 7 years ago

No plan to expand that in core for now, open issues for specific events that could be needed.