Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Howto go to beginning of line in tmux after remapping prefix to CTRL+A?

following the suggestion in this Archlinux wiki, in the page about tmux I remapped the command key prefix to C-a, to mimic GNU screen and to have something easier on the keyboard than C-b. So my .tmux.conf became this:

set -g default-terminal "screen-256color" unbind C-b set -g prefix C-a set-window-option -g mode-keys vi bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R 

However, while in screen it was possible to use C-a a to jump to the beginning of line, this does not work any more in tmux. As a sidenote, I'm using iTerm2 without the tmux integration.

Does anybody know how to solve this?

Thanks!

like image 295
MetalElf0 Avatar asked Mar 13 '12 12:03

MetalElf0


People also ask

What is Ctrl-B in tmux?

ctrl-b, <arrow key> switch to the pane in whichever direction you press. ctrl-b, d. detach from tmux, leaving everything running in the background.

How do you use key bindings tmux?

KEY BINDINGS. tmux may be controlled from an attached client by using a key combination of a prefix key, 'C-b' (Ctrl-b) by default, followed by a command key. The default command key bindings are: C-b Send the prefix key (C-b) through to the application. C-o Rotate the panes in the current window forwards.


1 Answers

You need to tell tmux that Prefix+a should send the prefix key to the program running in the current pane:

bind a send-prefix 
like image 58
Chris Johnsen Avatar answered Sep 23 '22 00:09

Chris Johnsen