项目作者: chabou

项目描述 :
Extension for Hyper.app to enhance pane navigation.
高级语言: JavaScript
项目地址: git://github.com/chabou/hyper-pane.git
创建时间: 2017-02-04T23:27:08Z
项目社区:https://github.com/chabou/hyper-pane

开源协议:MIT License

下载


hyper-pane

CI Status
NPM version
Downloads
Conventional Commits

Extension for Hyper.app to enhance pane navigation. Navigate through panes with arrows, jump directly to a specific pane with digit, change focus on mouse hover or temporarily maximize a pane.

Navigation with arrows:
hyper-pane

Maximize pane:
hyper-pane-maximize

Inspired by https://github.com/iamstarkov/hyper-panes-iterm2-hotkeys

Install

To install, execute:

  1. hyper i hyper-pane

Or edit ~/.hyper.js manually and add "hyper-pane" to plugins:

  1. plugins: [
  2. "hyper-pane",
  3. ],

Configuration

Default configuration:

  1. module.exports = {
  2. config: {
  3. // other configs...
  4. paneNavigation: {
  5. debug: false,
  6. hotkeys: {
  7. navigation: {
  8. up: 'ctrl+alt+up',
  9. down: 'ctrl+alt+down',
  10. left: 'ctrl+alt+left',
  11. right: 'ctrl+alt+right'
  12. },
  13. jump_prefix: 'ctrl+alt', // completed with 1-9 digits
  14. permutation_modifier: 'shift', // Added to jump and navigation hotkeys for pane permutation
  15. maximize: 'meta+enter'
  16. },
  17. showIndicators: true, // Show pane number
  18. indicatorPrefix: '^⌥', // Will be completed with pane number
  19. indicatorStyle: { // Added to indicator <div>
  20. position: 'absolute',
  21. top: 0,
  22. left: 0,
  23. fontSize: '10px'
  24. },
  25. focusOnMouseHover: false,
  26. inactivePaneOpacity: 0.6 // Set to 1 to disable inactive panes dimming
  27. }
  28. }
  29. //...
  30. };

Supported keys

For modifier keys you can use shift, ctrl, alt, or meta. You can substitute option for alt and command for meta.

Other special keys are backspace, tab, enter, return, capslock, esc, escape, space, pageup, pagedown, end, home, left, up, right, down, ins, del, and plus.

Any other key you should be able to reference by name like a, /, $, *, or =.

⚠ Warning: Use ctrl+alt or cmd+alt modifier only with arrow and digit key. Otherwise, shortcut will not be detected by Hyper.

Usage

Navigation with arrows

Use ctrl+alt+<Up,Down,Left,Right> (or your configured hotkeys) to navigate to a neighbor pane.

Jump with digit

Use ctrl+alt+<1-9> (or your configured hotkeys) to jump directly to a numbered pane.
Panes are ordered “first child descendent” and 9 is reserved to the last pane.

Hotkey indicators are displayed on top left corner of each pane from 2 panes opened.
You can change its content, its style or hide them completly.

Pane permutation

Adding shift key (or your configured key) to previous hotkeys cause a pane switching.

Focus on mouse hover

Set config.paneNavigation.focusOnMouseHover to true and focus will change when mouse cursor enters into an another pane.

Maximize a pane

You can temporarily maximize pane with meta+enter (or your configured key) and restore it with the same key.
You can have one maximized pane per tab.

Dim inactive panes

By default, inactive panes are dimmed (opacity: 0.6).
You can disable this by setting inactivePaneOpacity to 1.