Nix repl in tmux - 'home' and 'end' keys don't work

Let me send the screen video here. The subject keys won’t work unless I get out of tmux. Do you have the same issue?

This solved the problem :grinning: - the 2 bind-key statements at the end
in my ~/.config/nixpkgs/home.nix

  programs.tmux.enable = true;
  programs.tmux.keyMode = "vi";
  programs.tmux.sensibleOnTop = true;
  programs.tmux.shortcut = "a";
  programs.tmux.terminal = "screen-256color";
  programs.tmux.secureSocket = false;
  programs.tmux.extraConfig = ''

# Make mouse useful in copy mode
setw -g mouse on
set -g set-clipboard on
#  bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -se c -i"
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
'';

This was fixed upstream in libeditline recently, as well as the same problem for urxvt even more recently, so it should filter down into nixpkgs in time.

1 Like