Skip to content

piotrkwarcinski/hx-tmux-navigator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hx-tmux-navigator

Seamlessly navigate between tmux panes and helix splits.

Installation

Helix steel plugins are managed using the forge package manager which can be installed either by:

The plugin itself can be installed by using:

forge pkg install --git "https://github.com/piotrkwarcinski/hx-tmux-navigator.git"

Configuration

The following allows you to use C-[hjkl] to navigate within and between tmux panes and hx splits.

  • Add the following to tmux.conf
is_hx="ps -o state= -o comm= -t '#{pane_tty}' \
    | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?hx?x?|fzf)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_hx" 'send-keys C-h'  'select-pane -L'
bind-key -n 'C-j' if-shell "$is_hx" 'send-keys C-j'  'select-pane -D'
bind-key -n 'C-k' if-shell "$is_hx" 'send-keys C-k'  'select-pane -U'
bind-key -n 'C-l' if-shell "$is_hx" 'send-keys C-l'  'select-pane -R'
  • Configure bindings in init.scm
(require (prefix-in navigator. "hx-tmux-navigator/navigator.scm"))

(keymap (global)
    (insert
      (C-h ":navigator.move-left")
      (C-l ":navigator.move-right")
      (C-j ":navigator.move-down")
      (C-k ":navigator.move-up"))
    (normal
      (C-h ":navigator.move-left")
      (C-l ":navigator.move-right")
      (C-j ":navigator.move-down")
      (C-k ":navigator.move-up")))

About

Seamlessly navigate between tmux panes and helix splits.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages