2013-01-13 26 views
12

一旦滾動模式頁,我怎麼使用按Ctrl +b按Ctrl +˚F來上下滾動頁面?TMUX向上/向下滾動用Ctrl-B和Ctrl-F

這些命令當前在字符之間來回移動。

.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

你能不能多加一點背景?默認情況下,'ctrl-b'是綁定鍵; ctrl-b,ctrl-b發送文字ctrl-b到tmux中的程序。如果這是在emacs模式下運行bash,你將會返回一個字符(ctrl-b)或者轉發(ctrl-f)。 –

+0

發表我的.tmux.conf,我正在使用iTerm – Dru

回答

19

下面添加到.tmux.conf,你可以在vim像移動使用hjkl按Ctrl +d/按Ctrl +ü(下頁/向上)在tmux滾動模式下。更甚者,您可以使用/進行搜索。

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 

希望這將幫助你:)

+0

非常感謝,這對我有幫助。 – polym