choose-pane

choose pane by label

t9md

2,187

11

0.8.0

MIT

GitHub

choose-pane Build Status

choose pane by label.

overview

How to start

  1. Configure keymap in your keymap.cson. (no default keymap except [, ] to activate next/previous tab).
  2. Invoke choose-pane:start from that keymap.
  3. Label is shown on panels and panes
  4. Choose label where you want to focus

[NOTE]:

Commands

scope: atom-workspace

scope: atom-text-editor#choose-pane-editor

Style customization

You can customize label style in style.less.

example 1: simple demonstration

.choose-pane {
  color: white;
  &.active {
    color: green;
  }
  &.last-focused {
    text-decoration: line-through;
  }
}

example 2: dim current pane, weak green highlight for target panes

Based on suggestion by @andyngo.

.choose-pane {
  background-color: rgba(112, 182, 101, .1);
  &.active {
    background-color: rgba(0, 0, 0, 0.3);
    color: fade(@syntax-text-color, 50);
  }
}

Keymap example

'atom-workspace:not([mini])':
  'ctrl-;': 'choose-pane:start'
  'cmd-k ;': 'choose-pane:focus-last-focused'

# Back to last focused.
'atom-text-editor#choose-pane-editor':
  'ctrl-;': 'choose-pane:last-focused'
'atom-text-editor.vim-mode-plus:not(.insert-mode)':
  '-': 'choose-pane:start'
  'm m': 'choose-pane:focus-last-focused'

'.markdown-preview':
  '-': 'choose-pane:start'
  'm m': 'choose-pane:focus-last-focused'

# For tree-view
'.tree-view':
  '-': 'choose-pane:start'
  'm m': 'choose-pane:focus-last-focused'

# Map '-', so that I can focus last-focused element by typing `-` twice.
'atom-text-editor#choose-pane-editor':
  '-': 'choose-pane:last-focused'

Label customization

From setting view, change labelChars.
Label is always matched case insensitively.