-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tomas Slusny <[email protected]>
- Loading branch information
Showing
5 changed files
with
557 additions
and
526 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,107 @@ | ||
# vim:foldmethod=marker:set ft=conf: | ||
# vim:foldmethod=marker: | ||
|
||
# General {{{ | ||
|
||
# Renumber windows sequentially after closing any of them | ||
set -g renumber-windows on | ||
# Renumber windows sequentially after closing any of them | ||
set -g renumber-windows on | ||
|
||
# Start window numbers at 1 to match keyboard order with tmux window order | ||
set -g base-index 1 | ||
set-window-option -g pane-base-index 1 | ||
# Start window numbers at 1 to match keyboard order with tmux window order | ||
set -g base-index 1 | ||
set-window-option -g pane-base-index 1 | ||
|
||
# Vi mode | ||
set -g status-keys vi | ||
setw -g mode-keys vi | ||
# Vi mode | ||
set -g status-keys vi | ||
setw -g mode-keys vi | ||
|
||
# Fix cursor change under Tmux | ||
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q' | ||
|
||
# Fix cursor change under Tmux | ||
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q' | ||
# }}} | ||
|
||
# Mappings {{{ | ||
|
||
# Use ^Space as prefix (do not interfere with Vim) | ||
unbind C-b | ||
set -g prefix C-Space | ||
bind C-space send-prefix | ||
# Use ^Space as prefix (do not interfere with Vim) | ||
unbind C-b | ||
set -g prefix C-Space | ||
bind C-space send-prefix | ||
|
||
# Kill current session | ||
bind X kill-session | ||
# Kill current session | ||
bind X kill-session | ||
|
||
# Open new windows and tabs with current path | ||
bind c new-window -c "#{pane_current_path}" | ||
bind '"' split-window -h -c "#{pane_current_path}" | ||
bind % split-window -v -c "#{pane_current_path}" | ||
# Open new windows and tabs with current path | ||
bind c new-window -c "#{pane_current_path}" | ||
bind '"' split-window -h -c "#{pane_current_path}" | ||
bind % split-window -v -c "#{pane_current_path}" | ||
|
||
# Vim "visual" mode in copy mode | ||
bind-key -t vi-copy v begin-selection | ||
bind-key -t vi-copy y copy-selection | ||
# Vim "visual" mode in copy mode | ||
bind-key -t vi-copy v begin-selection | ||
bind-key -t vi-copy y copy-selection | ||
|
||
# Pane resizing is different than in vim, so we cannot | ||
# just use +, -, <, > | ||
bind-key -r J resize-pane -D | ||
bind-key -r K resize-pane -U | ||
bind-key -r H resize-pane -L | ||
bind-key -r L resize-pane -R | ||
# Pane resizing is different than in vim, so we cannot | ||
# just use +, -, <, > | ||
bind-key -r J resize-pane -D | ||
bind-key -r K resize-pane -U | ||
bind-key -r H resize-pane -L | ||
bind-key -r L resize-pane -R | ||
|
||
# Vim style pane selection | ||
bind h select-pane -L | ||
bind j select-pane -D | ||
bind k select-pane -U | ||
bind l select-pane -R | ||
# Vim style pane selection | ||
bind h select-pane -L | ||
bind j select-pane -D | ||
bind k select-pane -U | ||
bind l select-pane -R | ||
|
||
# Clear screen fix | ||
bind C-l send-keys 'C-l' | ||
# Clear screen fix | ||
bind C-l send-keys 'C-l' | ||
|
||
# }}} | ||
|
||
# User interface {{{ | ||
|
||
# Disable annoying notifications | ||
set-option -g visual-bell off | ||
set-option -g visual-silence off | ||
set-option -g bell-action none | ||
|
||
# Command bar | ||
set -g message-command-bg "colour0" | ||
set -g message-command-fg "colour7" | ||
set -g message-bg "colour0" | ||
set -g message-fg "colour7" | ||
set -g pane-border-fg "colour19" | ||
set -g pane-active-border-fg "colour4" | ||
|
||
# Titles | ||
set -g set-titles on | ||
set -g set-titles-string '#T' | ||
|
||
# Status bar | ||
set -g status on | ||
setw -g status-bg default | ||
setw -g status-fg default | ||
|
||
set -g status-left '' | ||
set -g window-status-format '#[fg=black]#I:#W#F' | ||
set -g window-status-current-format '#[fg=blue]#I:#W#F' | ||
set -g status-right '#[fg=cyan]#{session_name}' | ||
# Disable annoying notifications | ||
set-option -g visual-bell off | ||
set-option -g visual-silence off | ||
set-option -g bell-action none | ||
|
||
# Command bar | ||
set -g message-command-bg "colour0" | ||
set -g message-command-fg "colour7" | ||
set -g message-bg "colour0" | ||
set -g message-fg "colour7" | ||
set -g pane-border-fg "colour19" | ||
set -g pane-active-border-fg "colour4" | ||
|
||
# Titles | ||
set -g set-titles on | ||
set -g set-titles-string '#T' | ||
|
||
# Status bar | ||
set -g status on | ||
setw -g status-bg default | ||
setw -g status-fg default | ||
|
||
set -g status-left '' | ||
set -g window-status-format '#[fg=black]#I:#W#F' | ||
set -g window-status-current-format '#[fg=blue]#I:#W#F' | ||
set -g status-right '#[fg=cyan]#{session_name}' | ||
|
||
# }}} | ||
|
||
# Plugins {{{ | ||
|
||
# Session save and restore stuff | ||
set -g @resurrect-strategy-vim 'session' | ||
set -g @resurrect-strategy-nvim 'session' | ||
set -g @resurrect-capture-pane-contents 'on' | ||
set -g @continuum-restore 'on' | ||
set -g @continuum-save-interval '10' | ||
# Session save and restore stuff | ||
set -g @resurrect-strategy-vim 'session' | ||
set -g @resurrect-strategy-nvim 'session' | ||
set -g @resurrect-capture-pane-contents 'on' | ||
set -g @continuum-restore 'on' | ||
set -g @continuum-save-interval '10' | ||
|
||
# Pathogen-like loader for plugins | ||
run-shell 'find -L ~/.tmux/bundle -type f -name "*.tmux" | while read f; do bash $f; done' | ||
# Pathogen-like loader for plugins | ||
run-shell 'find -L ~/.tmux/bundle -type f -name "*.tmux" | while read f; do bash $f; done' | ||
|
||
# }}} | ||
|
||
# User configuration {{{ | ||
|
||
run-shell "[ -e ~/.tmux.conf.local ] && tmux source-file ~/.tmux.conf.local; true" | ||
run-shell "[ -e ~/.tmux.conf.local ] && tmux source-file ~/.tmux.conf.local; true" | ||
|
||
# }}} |
Oops, something went wrong.