santip / resize-panes

Atom Package for resizing panes
https://atom.io/packages/resize-panes
MIT License
15 stars 8 forks source link

Keybindings for windows and linux #3

Open luto opened 10 years ago

luto commented 10 years ago

Since windows and linux do not have a CMD-key, this plugin won't work out of the box on these platforms.

santip commented 10 years ago

Is there a standard approach for this in the atom community?

luto commented 10 years ago

I guess this is the "official one": https://github.com/atom/tree-view/blob/master/keymaps/tree-view.cson

.platform-darwin':
  'cmd-\\': 'tree-view:toggle'

'.platform-win32, .platform-linux':
  'ctrl-\\': 'tree-view:toggle'
dideler commented 9 years ago

+1, lack of a Linux keybinding is preventing me from using the package.

My experience is that CTRL is usually used in place of CMD for Atom on Linux, as @luto pointed out.

Also, the README in this repo and the page at https://atom.io/packages/resize-panes specify different keybindings. One says to use cmd-shift, the other says to use cmd-alt.

Edit: This was already mentioned in #8

JamesGould123 commented 9 years ago

@dideler, @santip appears to be inactive currently. For the time being you can go into keymaps/resize-panels.cson and swap the code out for this:

'.platform-darwin':
  'cmd-alt-=': 'resize-panes:enlarge-active-pane'
  'cmd-alt--': 'resize-panes:shrink-active-pane'
'.platform-win32, .platform-linux':
  'ctrl-alt-=': 'resize-panes:enlarge-active-pane'
  'ctrl-alt--': 'resize-panes:shrink-active-pane'

I'm working on Windows, and I can't guarantee it works on Mac or Linux, but I'll put in a pull request, as I see no reason it would not work.

Update: it appears in the current source it is fixed. Not sure why you're still having this problem, have you tried uninstalling/re-installing or updating the package?

dideler commented 9 years ago

@JamesGould123 I'm guessing the version on https://atom.io/packages/resize-panes is behind master.

Is there a way to install a package from GitHub instead of from atom.io (which has published packages)?

I couldn't find any way to do that with apm.

JamesGould123 commented 9 years ago

@dideler, I believe you just need to git clone the GitHub repository into your .atom\packages folder, and they should automatically install.

dideler commented 9 years ago

Unfortunately it didn't work. I cloned the repo to ~/.atom/packages/resize-panes then opened Atom with some split windows but ctrl-alt-= and ctrl-alt-- didn't do anything.