config/.tmux.conf

100 lines
2.9 KiB
Plaintext
Raw Normal View History

2010-05-06 10:19:54 +02:00
# $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.
# 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 j and k, a bit like vim
# as of tmux 1.1, there is no way to move based on pane position (ie, no way to
# move the pane to the right)
2013-02-25 17:15:03 +01:00
#bind j down-pane
#bind k up-pane
2010-05-06 10:19:54 +02:00
# 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
# Change the prefix key (screen friendly).
#set-option -g prefix C-a
#unbind-key C-b
#bind-key C-a last-window
# set-option -g default-terminal "screen-256color"
set-option -g status-keys vi
set-option -g bell-action any
set-option -g set-titles on
set-option -g set-titles-string '#H:#S.#I.#P #W #T'
set-option -g visual-bell on
2016-05-23 14:59:23 +02:00
#set-option -g -q mouse on
#bind-key -T root PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage"
#bind-key -t vi-copy PPage page-up
#bind-key -t vi-copy NPage page-down
2016-09-01 10:11:55 +02:00
set-window-option -g xterm-keys on
2016-05-23 14:59:23 +02:00
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
2015-12-08 14:59:00 +01:00
2010-05-06 10:19:54 +02:00
setw -g mode-keys vi
setw -g monitor-activity on
bind C-j previous-window
bind C-k next-window
#set-option -g status-utf8 on
2010-05-06 10:19:54 +02:00
set-option -g status-justify left
set-option -g status-bg black
set-option -g status-fg white
set-option -g status-left-length 40
set-option -g pane-active-border-fg green
set-option -g pane-active-border-bg black
set-option -g pane-border-fg white
set-option -g pane-border-bg black
set-option -g message-fg black
set-option -g message-bg green
setw -g window-status-bg black
setw -g window-status-current-fg green
#setw -g window-status-flagged-fg yellow
set -g status-left '#[fg=red]#H#[fg=green]:#[fg=white]#S #[fg=green]][#[default]'
# this one draws the window title in the status bar, but eats up a lot of space
# set -g status-right '#[fg=green]][#[fg=white] #T #[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
set -g status-right '#[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
2016-05-23 14:59:23 +02:00
# Scroll History
set -g history-limit 30000
2010-05-06 10:19:54 +02:00
2015-12-08 14:59:32 +01:00
#improve communication with vim
set -g focus-events on
2016-05-23 14:59:23 +02:00
#New pane in same directory
bind c new-window -c "#{pane_current_path}"
2010-05-06 10:19:54 +02:00
bind r source-file ~/.tmux.conf