2013-01-13 8 views
12

Una volta in scroll-mode, come posso utilizzare Ctrl +b e Ctrl +f per scorrere su e giù per le pagine?tmux scorrere su/giù pagina usando Ctrl-B e Ctrl-F

Questi comandi attualmente si spostano avanti e indietro tra i caratteri.

.tmux.conf

set -g default-terminal "screen-256color" 
setw -g xterm-keys on 
set -g status-bg black 
set -g status-fg white 
set -g history-limit 999999999 

bind C-d detach 
bind r source-file ~/.tmux.conf 

set -g prefix C-z 

if-shell 'test "$(tmux -V)" = "tmux 1.5"' 'set -g prefix C-a,C-z' 
if-shell 'test "$(tmux -V)" = "tmux 1.6"' 'set -g prefix2 C-a' 
if-shell 'test "$(tmux -V)" = "tmux 1.7"' 'set -g prefix2 C-a' 

unbind C-b 
bind C-a send-keys C-a 
bind C-z send-keys C-z 

# These are available in iTerm by default, but need to be explicitly configured 
# in Terminal.app. 
# S-Up: ^[[1;2A 
# S-Down: ^[[1;2B 
# S-Right: ^[[1;2C 
# S-Left: ^[[1;2D 
bind -n S-Up copy-mode 
bind -n S-Down command-prompt 
bind -n S-Right next-window 
bind -n S-Left previous-window 

#set -g base-index 1 

set-window-option -g mode-keys vi 
+1

si può dare un po 'più di contesto? Di default, 'ctrl-b' è la chiave di bind; ctrl-b, ctrl-b invia un letterale ctrl-b al programma all'interno di tmux. Se si sta eseguendo bash in modalità emacs, si tornerà indietro di un carattere (ctrl-b) o avanti (ctrl-f). –

+0

Inserito il mio .tmux.conf e sto usando iTerm – Dru

risposta

19

Aggiungi basso nella .tmux.conf, è possibile muoversi come in vim usare hjkl, Ctrl +D/Ctrl +U (Pag giù/Up) nella modalità di scorrimento tmux. Ancora di più, è possibile utilizzare / per la ricerca.

setw -g mode-keys vi 
set -g status-keys vi 
bind-key -t vi-edit Up history-up 
bind-key -t vi-edit Down history-down 

Spero che questo vi aiuterà a :)

+0

Grazie mille, mi ha aiutato. – polym