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

Setup custom key bindings for windows/linux #3

Closed
wants to merge 3 commits into from

Conversation

yckart
Copy link

@yckart yckart commented Jun 3, 2013

As you documented, we (windows/linux users) have to define our own key bindings to navigate through panes.

When maximized, you can navigate to your other panes with: cmd+ctrl+→ or cmd+ctrl+←

Windows / Linux users will need to setup their own key bindings

But why do we have to? ctr+alt+... is not used by windows nor st2. Or are there any other thoughts I've missed?

[
    { "keys": ["ctrl+alt+enter"], "command": "max_pane" },
    { "keys": ["ctrl+alt+right"], "command": "shift_pane" },
    { "keys": ["ctrl+alt+left"], "command": "unshift_pane" }
]

@jisaacks
Copy link
Owner

@yckart I only did not set them up because the keys I wanted to use ( cmd ) does not exist in Win/Lin and wasn't sure what key combo to use as an alternative.

If you would like to make a pull request I would accept it. I am already setting the key command for max_pane so you would only need to set it for shift_pane and unshift_pane for Windows and Linux.

@jisaacks
Copy link
Owner

@yckart I am so sorry I missed this, I will gladly merge this in, would you mine making the following changes first:

  • Add the same key bindings to the linux key bindings file
  • Remove the line Windows / Linux users will need to setup their own key bindings from the Read Me

@yckart
Copy link
Author

yckart commented Feb 14, 2015

@jisaacks Sorry, for the delay!

I thought right now a bit about that topic (bindings) and have to say, that we should re-map them. I don't really like the switch between shift and ctrl and as you see, the new windows-bindings are all on ctrl+alt+?.

So, what do you think about a change?

@jisaacks
Copy link
Owner

Yeah that sounds fine.

Cuts the key binding differences between mac, windows and linux.
@deathaxe
Copy link
Collaborator

deathaxe commented Aug 6, 2019

"ctrl+alt+enter" is used for replace_all in the find & replace panel of Sublime Text 3. Using it in MaxPane would override this default binding. Even if it would not directly conflict, this binding would be dangerous as it is sometimes not clear whether the find & replace panel has focus. So you might replace text by accident even though a pane was to be maximized.

Setting up bindings for shift_pane and unshift_pane would help ST2 users only. ST3 provides the focus_neighbouring_group out of the box with a proper default key binding. Therefore the 2 former commands are deprecated.

deathaxe pushed a commit that referenced this pull request Aug 8, 2019
Closes #3
Fixes  #9

The currently used `ctrl+shift+enter` is already assigned to the
`add_line_before` command in Sublime Text 3's Default package.

This commit resolves this conflict by binding the `max_pane` command to

  MacOS:         `super+k`, `super+f`
  Windows/Linux: `ctrl+k`, `ctrl+f`

as

1) this binding is not currently used by vanilla ST3 or Origami plugin.
2) the sequence ctrl+k, ctrl+... is used for various pane and layout
   related functions like `focus_neighbouring_group`,
   `move_to_neighbouring_group` or `toggle_sidebar` in Sublime Text or
   Origami plugin.

Note:
  The key bindings for `shift_pane` and `unshift_pane` on MacOS are
  kept unchanged for compatibility reasons with ST2 and iTerm behavior.

  New bindings for Linux/Windows are not added because ST3 provides
  these functions and proper bindings out of the box, which deprecates
  both functions.
@deathaxe deathaxe closed this in #17 Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants