Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use 'splice' keyboard shortcut on win/linux #863

Open
alza-bitz opened this issue Feb 16, 2016 · 8 comments
Open

Cannot use 'splice' keyboard shortcut on win/linux #863

alza-bitz opened this issue Feb 16, 2016 · 8 comments

Comments

@alza-bitz
Copy link
Contributor

How to use 'splice' shortcut on win/linux?

Ctrl + S saves the file.. http://doc.ccw-ide.org/keyboard-shortcuts.html

@alza-bitz alza-bitz changed the title How to use 'splice' keyboard shortcut on win/linux? Cannot use 'splice' keyboard shortcut on win/linux Feb 16, 2016
@gilch
Copy link

gilch commented Feb 28, 2016

It doesn't have a keyboard shortcut for splice included in Windows, but the command is there. In the top menu, go to Window->Preferences, Type in "Keys" at the dialog to find the key bindings then under Keys, type in "Splice" to find the splice command. Select it, then add your preferred keyboard shortcut under Binding:, but watch out for conflicts with other shortcuts. (You could even change the conflicting shortcut.)

@alza-bitz
Copy link
Contributor Author

Ok thanks - I decided to bind 'splice' to ctrl + alt + s (since ctrl + s) is already taken..

Any reason that (ctrl + alt + s) couldn't be made the default for Windows?

@laurentpetit
Copy link
Member

@alzadude no reason not to change it for Windows, good idea

@laurentpetit
Copy link
Member

@alzadude @gilch It's a low-hanging fruit issue. Do you feel like you could provide a Pull Request for it?
It should include the changes in plugin.xml, as well as documentation https://github.com/laurentpetit/ccw/blob/master/doc/keyboard-shortcuts.adoc

@gilch
Copy link

gilch commented Mar 7, 2016

I wonder what's the least surprising key combination for this. Are the default CCW bindings based on a plugin for some other tool? Emacs? Vim? We should probably do the same.

@laurentpetit
Copy link
Member

@gilch not really. S is for Slurp. I think if ctrl + alt + s works for windows, it could be interesting to do the switch. Then for cohesion, Barf should also be made available via ctrl + alt. Don't know if this will break a command on windows (mac user here).

@gilch
Copy link

gilch commented Mar 8, 2016

Are you suggesting we change slurp to Ctrl+Alt+S? Then what should splice be bound to?

I often find that I need to barf or slurp multiple elements at once. The current Windows configuration for slurp is slow because it requires a leader key chord, either Ctrl+0 or Ctrl+), then the command key, either s or left. Similarly for barf and the backwards versions. It would be much nicer to use if it didn't need a leader chord.

I believe Emacs Paredit uses Ctrl+) for forward slurp and Ctrl+} for forward barf. (And symmetrically C-( and C-{ for backwards slurp/barf.) Unfortunately, Eclipse already has Ctrl+{ bound to "Toggle Split Editor (Vertical)" on Windows, so that's a conflict.

If we use Ctrl+Alt+S as forward slurp as (I think) you suggest (and barf as Ctrl+Alt+B for cohesion), then what about backwards slurp and barf? I could suggest Ctrl+Alt+Shift+S and Ctrl+Alt+Shift+B for backwards slurp and barf, respectively. These don't seem to be taken, and it follows the usual convention of a shift doing the opposite of a keyboard command.

@alza-bitz
Copy link
Contributor Author

I should have probably been a bit clearer in my original comment,

  1. I am only discussing the shortcut for 'splice' - this is because it's the only shortcut that doesn't have a binding for Win/Linux (according to the documentation)
  2. I am on Linux, not Windows (not that it probably makes a difference in this case, but I guess the lack of a default shortcut will affect users of both equally)

If you want, I can make a PR just for the Ctrl+Alt+S 'splice' binding on Win/Linux (but I can only test on Linux, I don't have a Windows setup I can easily test on)

Let me know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants