Hacker News new | ask | show | jobs
by snerbles 3677 days ago
> The biggest complaint I regularly see about it is that people are used to the screen keybindings.

That's my problem with Tmux. Ctrl-a,d is already burned into muscle memory, and for my applications Screen is "good enough".

4 comments

1. start tmux

2. in the first shell you get run:

    tmux set-option prefix C-a
3. now your prefix is C-a like in screen.

Permanentize it by changing tmux.conf :)

Beyond the other answers telling you to remap the prefix key: tmux used to come with an example configuration file that maps to the screen defaults:

    https://github.com/tmux/tmux/commit/2a1bb9#diff-fefa423d67264099ae82d4d2f5422b09
However, it appears that they have removed it at the beginning of the year. At least it's still in the commit history.
in your .tmux.conf

  set -g prefix C-a
  unbind C-b
  bind C-a send-prefix
Tmux expects you to rebind its leader to Ctrl-a once you're ready to move off of screen. Otherwise, it's default works nicely if you are nesting screen inside of Tmux or vis-versa
I use Ctrl-a as the "go back to beginning of line" shortcut that Readline-capable programs offer by default [1]. That's actually one reason I never got used to Screen ;)

[1] that is, using the Emacs keybindings it exposes by default. I know you can change that through .inputrc

I'm using Ctrl-a on tmux, and to get back to beginning on line I just have to press it twice Ctrl-a Ctrl-a.