-
-
Save josephbuchma/72709f7b22655f7ce339 to your computer and use it in GitHub Desktop.
This file contains 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
# 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. This is intended for tmux 1.3, which handles pane selection | |
# differently from the previous versions | |
# split windows like vim | |
# vim's definition of a horizontal/vertical split is reversed from tmux's | |
bind s split-window -v -c '#{pane_current_path}' | |
bind v split-window -h -c '#{pane_current_path}' | |
# move around panes with hjkl, as one would in vim after pressing ctrl-b | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# resize panes | |
bind < resize-pane -L 10 | |
bind > resize-pane -R 10 | |
bind - resize-pane -D 10 | |
bind + resize-pane -U 10 | |
# vi-style controls for copy mode | |
setw -g mode-keys vi | |
set -g default-terminal "screen-256color" | |
bind-key R respawn-window | |
# create a session with a throw-away window | |
new true | |
# create the windows we really want | |
neww -n vim | |
splitw -v -p 20 -t 0 | |
# use zsh | |
set-option -g default-shell /bin/zsh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment