Created
March 25, 2015 20:59
-
-
Save rubysolo/e4b1bbca6df6b71bec4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $Id: vim-keys.conf,v 1.1 2010/01/17 16:24:09 nicm Exp $ | |
# | |
# vim-keys.conf, v1.0 2010/01/15 | |
# | |
# By Daniel Thau. Public domain. | |
# | |
# This configuration file binds many vi- and vim-like bindings to the | |
# appropriate tmux key bindings. Note that for many key bindings there is no | |
# tmux analogue. | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# reload config | |
bind r source-file ~/.tmux.conf | |
# send keys to all panes | |
bind C-s set-window-option synchronize-panes | |
bind C-q set-window-option synchronize-panes off | |
set -g status-bg blue | |
set -g status-fg white | |
setw -g window-status-current-attr underscore | |
# split windows like vim | |
# vim's definition of a horizontal/vertical split is reversed from tmux's | |
bind s split-window -v | |
bind v split-window -h | |
# move around panes with h, j, k, and l, a bit like vim | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# resize panes like vim | |
# feel free to change the "1" to however many lines you want to resize by, only | |
# one at a time can be slow | |
bind < resize-pane -L 1 | |
bind > resize-pane -R 1 | |
bind - resize-pane -D 1 | |
bind + resize-pane -U 1 | |
# bind : to command-prompt like vim | |
# this is the default in tmux already | |
bind : command-prompt | |
# vi-style controls for copy mode | |
setw -g mode-keys vi | |
bind C-l pipe-pane -o 'cat >> ~/tmux-#I.#P.log' | |
# fix scrolling with page up / page down | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
set-option -g default-command "reattach-to-user-namespace -l fish" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment