Created
April 10, 2017 00:30
-
-
Save falonofthetower/0fe1d67f8d3fa4068e1234264a79239a 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
#! setw -g mode-keys vi */ | |
set -sg escape-time 0 | |
setw -g aggressive-resize on | |
#! bind -n M-h select-pane -L */ | |
#! bind -n M-j select-pane -D */ | |
unbind -n M-j | |
unbind -n M-k | |
# Sensible numbering | |
set -g base-index 1 | |
#! bind -n M-k select-pane -U */ | |
#! bind -n M-l select-pane -R */ | |
#! bind -n M-\ split-window -h -c '#{pane_current_path}' */ | |
#! bind -n M-- split-window -v -c '#{pane_current_path}' */ | |
#! bind -n M-= select-layout even-horizontal */ | |
#! bind -n M-+ select-layout even-vertical */ | |
#! bind -n M-n next-window */ | |
#! bind -n M-p previous-window */ | |
#! bind-key -nr M-Up resize-pane -U */ | |
#! bind-key -nr M-Down resize-pane -D */ | |
#! bind-key -nr M-Left resize-pane -L */ | |
#! bind-key -nr M-Right resize-pane -R */ | |
#! bind-key -n M-PPage copy-mode -u */ | |
#! bind-key -n M-u copy-mode */ | |
#! bind-key -n M-i paste-buffer */ | |
#! bind-key -n M-8 choose-session */ | |
#! bind-key -n M-9 switch-client -p */ | |
#! bind-key -n M-0 switch-client -n */ | |
#! set-option -g history-limit 100000 */ | |
#!set -g default-terminal "screen-256color" | |
set -g default-terminal screen-256color | |
#! set -g status-bg black */ | |
#! set -g status-fg white */ | |
#! set -g status-left '#[fg=green]#H' */ | |
#! set -g status-right '#[fg=green]#(uptime | cut -d "," -f 3-)' */ | |
#! set -g status off */ | |
#! setw -g monitor-activity on */ | |
#! set -g visual-activity on */ | |
#! set -g set-titles on */ | |
#! set -g set-titles-string '#S: #W' */ | |
#! setw -g automatic-rename */ | |
#! # highlight current window */ | |
#! set-window-option -g window-status-current-fg white */ | |
#! set-window-option -g window-status-current-bg green */ | |
#! # set color of active pane */ | |
#! set -g pane-border-fg colour235 */ | |
#! set -g pane-border-bg black */ | |
#! set -g pane-active-border-fg green */ | |
#! set -g pane-active-border-bg black */ | |
#! # remap prefix to Control + a */ | |
#! unbind C-b */ | |
#! set -g prefix ` */ | |
#! bind-key ` send-prefix */ | |
#! #set -g prefix C-a */ | |
#! # bind 'C-a C-a' to type 'C-a' */ | |
#! #bind C-a send-prefix */ | |
#! #unbind C-b */ | |
#! # force a reload of the config file */ | |
#! unbind r */ | |
#! bind r source-file ~/.tmux.conf */ | |
#! # quick pane cycling */ | |
#! unbind ^A */ | |
#! bind ^A select-pane -t :.+ */ | |
# $Id: screen-keys.conf,v 1.7 2010-07-31 11:39:13 nicm Exp $ | |
# | |
# By Nicholas Marriott. Public domain. | |
# | |
# This configuration file binds many of the common GNU screen key bindings to | |
# appropriate tmux key bindings. Note that for some key bindings there is no | |
# tmux analogue and also that this set omits binding some commands available in | |
# tmux but not in screen. | |
# | |
# Note this is only a selection of key bindings and they are in addition to the | |
# normal tmux key bindings. This is intended as an example not as to be used | |
# as-is. | |
# Bind appropriate commands similar to screen. | |
# lockscreen ^X x | |
# unbind ^X | |
# bind ^X lock-server | |
# unbind x | |
# bind x lock-server | |
# # screen ^C c | |
# unbind ^C | |
# bind ^C new-window | |
# unbind c | |
# bind c new-window | |
# # detach ^D d | |
# unbind ^D | |
# bind ^D detach | |
# # displays * | |
# unbind * | |
# bind * list-clients | |
# # next ^@ ^N sp n | |
# unbind ^@ | |
# bind ^@ next-window | |
# unbind ^N | |
# bind ^N next-window | |
# unbind " " | |
# bind " " next-window | |
# unbind n | |
# bind n next-window | |
# # title A | |
# unbind A | |
# bind A command-prompt "rename-window %%" | |
# # other ^A | |
# unbind ^A | |
# bind ^A last-window | |
# # prev ^H ^P p ^? | |
# unbind ^H | |
# bind ^H previous-window | |
# unbind ^P | |
# bind ^P previous-window | |
# unbind p | |
# bind p previous-window | |
# unbind BSpace | |
# bind BSpace previous-window | |
# # windows ^W w | |
# unbind ^W | |
# bind ^W list-windows | |
# unbind w | |
# bind w list-windows | |
# # quit \ | |
# unbind '\' | |
# bind '\' confirm-before "kill-server" | |
# # kill K k | |
# unbind K | |
# bind K confirm-before "kill-window" | |
# unbind k | |
# bind k confirm-before "kill-window" | |
# # redisplay ^L l | |
# unbind ^L | |
# bind ^L refresh-client | |
# unbind l | |
# bind l refresh-client | |
# # split -v | | |
# unbind | | |
# bind | split-window | |
# # :kB: focus up | |
# unbind Tab | |
# bind Tab select-pane -t:.+ | |
# unbind BTab | |
# bind BTab select-pane -t:.- | |
# # " windowlist -b | |
# unbind '"' | |
# bind '"' choose-window | |
unbind C-b | |
set -g prefix ` | |
bind-key ` send-prefix | |
# Vim like copy mode | |
set -g mouse on | |
setw -g mode-keys vi | |
set -g status-keys vi | |
bind-key -t vi-copy 'v' begin-selection | |
bind-key -t vi-copy 'y' copy-selection | |
# Tmux-Url-Select | |
bind z run tmux-url-select | |
# Fix home & end | |
bind -n End send-key C-e | |
bind -n Home send-key C-a | |
unbind [ | |
bind Escape copy-mode | |
unbind p | |
bind p paste-buffer | |
# smart pane switching with awareness of vim splits | |
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L" | |
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D" | |
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U" | |
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R" | |
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l" | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-copycat' | |
# You need to install tpm plugins (prefix + I) | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
# tmux-yank https://github.com/tmux-plugins/tmux-yank | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set -g @plugin 'tmux-plugins/tmux-open' | |
# https://github.com/tmux-plugins/tmux-resurrect/blob/master/docs/restoring_programs.md | |
set -g @resurrect-processes '"~guard->guard" "~rails c->rails c" "~rails s->rails server" "~weechat->weechat" "~sidekiq->sidekiq" "~ember->ember server" "~zeus->zeus start"' | |
set -g @resurrect-strategy-vim 'session' | |
set -g @resurrect-capture-pane-contents 'on' | |
set -g @continuum-restore 'on' | |
bind-key -n C-M-Up resize-pane -U 15 | |
bind-key -n C-M-Down resize-pane -D 15 | |
bind-key -n C-M-Left resize-pane -L 25 | |
bind-key -n C-M-Right resize-pane -R 25 | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment