SHOW:
|
|
- or go back to the newest paste.
| 1 | - | set nocompatible |
| 1 | + | # Use ` as the prefix character |
| 2 | - | syntax on |
| 2 | + | unbind C-b |
| 3 | set -g prefix ` | |
| 4 | - | source ~/.plugin.vimrc |
| 4 | + | bind ` send-prefix |
| 5 | ||
| 6 | - | set tabstop=4 |
| 6 | + | # Use `-R to reload source file config |
| 7 | - | set expandtab |
| 7 | + | bind R source-file ~/.tmux.conf |
| 8 | - | set autoindent |
| 8 | + | |
| 9 | - | set shiftwidth=4 |
| 9 | + | # Use `-X to kill window |
| 10 | - | set ruler |
| 10 | + | bind X confirm kill-window |
| 11 | - | set number |
| 11 | + | |
| 12 | - | set backspace=indent,eol,start |
| 12 | + | # Set Xterm key bindings |
| 13 | - | set visualbell |
| 13 | + | setw -g xterm-keys on |
| 14 | - | set bg=dark |
| 14 | + | |
| 15 | - | set hlsearch |
| 15 | + | # Set mouse mode off |
| 16 | - | set cursorline |
| 16 | + | set -g mouse off |
| 17 | - | set nowrap |
| 17 | + | |
| 18 | - | set noswapfile |
| 18 | + | # Set window numbering from 1 |
| 19 | - | set wildmode=longest,list,full |
| 19 | + | set -g base-index 1 |
| 20 | - | set wildmenu |
| 20 | + | |
| 21 | - | set encoding=utf-8 " Required for YouCompleteMe |
| 21 | + | # Set vim key bindings in copy paste mode |
| 22 | set -g mode-keys vi | |
| 23 | - | " Set backup, swap and undo directories |
| 23 | + | |
| 24 | - | " |
| 24 | + | # Set no delay to prefix key press |
| 25 | - | " set backupdir=~/.vim/backup// |
| 25 | + | set -sg escape-time 0 |
| 26 | - | " set directory=~/.vim/swap// |
| 26 | + | |
| 27 | - | " set undodir=~/.vim/undo// |
| 27 | + | # Set titles |
| 28 | set -g set-titles on | |
| 29 | - | " Session options |
| 29 | + | set -g set-titles-string "tmux #(whoami)@#(hostname) (#I:#W)" |
| 30 | - | set ssop-=options " do not store global and local values in a session |
| 30 | + | |
| 31 | - | set ssop-=folds " do not store folds |
| 31 | + | set-option -g renumber-windows on |
| 32 | ||
| 33 | - | " Save session |
| 33 | + | # Set status bar |
| 34 | - | nnoremap <C-s> :mks! |
| 34 | + | set-option -g status-position bottom |
| 35 | set -g status-bg black | |
| 36 | - | " Search for the selected visual block |
| 36 | + | set -g status-fg white |
| 37 | - | vnoremap // y/<C-R>"<CR> |
| 37 | + | set -g status-interval 5 |
| 38 | - | vnoremap * y/<C-R>"<CR> |
| 38 | + | set -g status-left-length 120 |
| 39 | set -g status-right-length 90 | |
| 40 | - | " Show ctag selection if multiple options |
| 40 | + | set -g status-left "#[fg=Green]#(whoami)#[fg=white]::#[fg=cyan]#(hostname)#[bg=default]#[fg=white]::#[fg=red]#S#[fg=white] " |
| 41 | - | nnoremap <C-]> g<C-]> |
| 41 | + | set -g status-justify left |
| 42 | set -g status-right '#[fg=cyan]:: %a %b %d %H:%M' | |
| 43 | - | " Change vim tabs |
| 43 | + | |
| 44 | - | nnoremap <C-lt> :tabnext<CR> |
| 44 | + | setw -g automatic-rename on |
| 45 | - | nnoremap <C-gt> :tabprevious<CR> |
| 45 | + | |
| 46 | # Set keyboard bindings for window reorder | |
| 47 | - | " Maximize tabs |
| 47 | + | bind -n C-H swap-window -t -1 |
| 48 | - | nnoremap <C-w>/ <C-w>\|<C-w>_ |
| 48 | + | bind -n C-L swap-window -t +1 |
| 49 | ||
| 50 | - | " Map F4 to switch between cpp and h file |
| 50 | + | # Set keyboard bindings for pane resize |
| 51 | - | map <F4> :e %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp,<CR> |
| 51 | + | bind -n M-Left resize-pane -L |
| 52 | bind -n M-Right resize-pane -R | |
| 53 | - | " Setting ctags and plugins for MARS development |
| 53 | + | bind -n M-Up resize-pane -U |
| 54 | - | set tags=./tags;,tags; |
| 54 | + | bind -n M-Down resize-pane -D |
| 55 | ||
| 56 | - | " Setting vim path per session. Helps with finding files |
| 56 | + | # Set larger scrollback buffer |
| 57 | - | set path=$PWD/** |
| 57 | + | set -g history-limit 100000 |
| 58 | ||
| 59 | # Shortcut to clear scrollback buffer | |
| 60 | bind -n C-k clear-history | |
| 61 | ||
| 62 | # Synchronize input to panes with C-e | |
| 63 | bind e setw synchronize-panes on | |
| 64 | bind E setw synchronize-panes off | |
| 65 | ||
| 66 | # Enable tmux-resurrect plugin | |
| 67 | run-shell ~/.tmux/plugins/tmux-resurrect-master/resurrect.tmux |