Fix navigation annoyances #6

Closed
opened 2019-07-24 13:31:16 +00:00 by benie · 0 comments
Owner

Currently tmux and vim are configured to use the same key bindings for
navigation seamlessly between the two: C-h, C-j, C-k, C-l

The mechanism for detecting when a pane contains a vim instance depends on the
name of the process that pane is currently running, this is error prone since a
process such as git commit can spawn a vim instance. The process name does
not match grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$" so only tmux navigation
occurs. A possible solution to this issue:

  1. Use a tmux window options, those prefixed with @ followed by any string.
  • tmux set-window option @vim<pane-index> 1
  1. Setup vim to set the tmux window option on process start, and unset it on
    process finish.
  2. Use the window option to check if the current pane contains a vim process.
Currently `tmux` and `vim` are configured to use the same key bindings for navigation seamlessly between the two: `C-h`, `C-j`, `C-k`, `C-l` The mechanism for detecting when a pane contains a `vim` instance depends on the name of the process that pane is currently running, this is error prone since a process such as `git commit` can spawn a `vim` instance. The process name does not match `grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"` so only `tmux` navigation occurs. A possible solution to this issue: 1. Use a `tmux` window options, those prefixed with `@` followed by any string. - `tmux set-window option @vim<pane-index> 1` 2. Setup `vim` to set the `tmux` window option on process start, and unset it on process finish. 3. Use the window option to check if the current pane contains a `vim` process.
benie referenced this issue from a commit 2019-08-11 17:49:42 +00:00
benie closed this issue 2019-08-11 17:49:42 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: config/tmux#6
No description provided.