-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
703d9d5
commit fb79217
Showing
1 changed file
with
90 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# ----------------------------------------------------------------------------- | ||
# This config is targeted for tmux 3.0+. | ||
# | ||
# Read the "Plugin Manager" section (bottom) before trying to use this config! | ||
# ----------------------------------------------------------------------------- | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Global options | ||
# ----------------------------------------------------------------------------- | ||
|
||
# Set a new prefix / leader key. | ||
set -g prefix C-a | ||
bind C-a send-prefix | ||
|
||
# Allow opening multiple terminals to view the same session at different sizes. | ||
setw -g aggressive-resize on | ||
|
||
# Remove delay when switching between Vim modes. | ||
set -sg escape-time 0 | ||
|
||
# Allow Vim's FocusGained to work when your terminal gains focus. | ||
# Requires Vim plugin: https://github.com/tmux-plugins/vim-tmux-focus-events | ||
set -g focus-events on | ||
|
||
# Add a bit more scroll history in the buffer. | ||
set -g history-limit 50000 | ||
|
||
# Enable color support inside of tmux. | ||
set -g default-terminal "xterm-256color" | ||
set -ga terminal-overrides ",*256col*:Tc" | ||
|
||
# Send xterm compatible control arrow keys so they work with Vim. | ||
setw -g xterm-keys on | ||
|
||
# Ensure window titles get renamed automatically. | ||
setw -g automatic-rename | ||
|
||
# Ensure window index numbers get reordered on delete. | ||
set-option -g renumber-windows on | ||
|
||
# Start windows and panes index at 1, not 0. | ||
set -g base-index 1 | ||
setw -g pane-base-index 1 | ||
|
||
# Enable full mouse support. | ||
set -g mouse on | ||
|
||
# Various colors. | ||
set -g status-style fg=colour244 | ||
set -g window-status-current-style fg=colour222 | ||
set -g pane-border-style fg=colour240 | ||
set -g pane-active-border-style fg=colour243 | ||
|
||
set -g status-left '' | ||
set -g status-left-length 0 | ||
set -g status-right '' | ||
set -g status-right-length 0 | ||
|
||
# Display a clock on the bottom right of the status bar. | ||
#set -g status-right '%a %Y-%m-%d %H:%M' | ||
#set -g status-right-length 20 | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Key bindings | ||
# ----------------------------------------------------------------------------- | ||
|
||
# Unbind default keys | ||
# unbind C-b | ||
unbind '"' | ||
unbind % | ||
|
||
# Reload the tmux config. | ||
bind-key r source-file ~/.tmux.conf | ||
|
||
# Split panes. | ||
bind-key b split-window -v | ||
bind-key v split-window -h | ||
|
||
# Move around panes with ALT + arrow keys. | ||
bind-key -n M-Up select-pane -U | ||
bind-key -n M-Left select-pane -L | ||
bind-key -n M-Down select-pane -D | ||
bind-key -n M-Right select-pane -R | ||
|
||
setw -g mode-keys vi | ||
|
||
bind -T copy-mode-vi v send -X begin-selection | ||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel --clipboard" | ||
bind P paste-buffer | ||
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xsel --clipboard" |