Skip to content

Instantly share code, notes, and snippets.

@orendon
Last active August 29, 2015 13:56
Show Gist options
  • Save orendon/8890829 to your computer and use it in GitHub Desktop.
Save orendon/8890829 to your computer and use it in GitHub Desktop.
Some extra configs for my current vim and tmux setup
# change bind to ctrl+a
unbind C-b
set -g prefix C-a
# switch pane alt+arrow
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# window notifications
setw -g monitor-activity on
set -g visual-activity on
# highlight current window
set-window-option -g window-status-current-bg yellow
# switch pane using mouse
set-option -g mouse-select-pane off
# improve colors
set -g default-terminal "screen-256color"
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# vim-style copying
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection]
##############
## Status Bar
##############
# status bar colors
set -g status-bg black
set -g status-fg white
# alignment settings
set-option -g status-justify centre
set-option -g status-position top
# status left options
set-option -g status-left '#[fg=green][#[bg=black,fg=cyan]#S#[fg=green]]'
set-option -g status-left-length 20
# window list options
setw -g automatic-rename on
set-window-option -g window-status-format '#[fg=cyan,dim]#I#[fg=blue]:#[default]#W#[fg=grey,dim]#F'
set-window-option -g window-status-current-format '#[bg=colour23,fg=cyan,bold]#I#[bg=colour23,fg=cyan]:#[fg=colour230]#W#[fg=dim]#F'
set -g base-index 1
# status right options
set -g status-right '#[fg=green][#[fg=cyan]%Y-%m-%d #[fg=white]%H:%M#[default] #($HOME/bin/battery)#[fg=green]]'
# same directory over windows/panes
bind-key c new-window -c "#{pane_current_path}"
bind-key % split-window -h -c "#{pane_current_path}"
bind-key '"' split-window -v -c "#{pane_current_path}"
" Show trailing whitespace and spaces before a tab:
:highlight ExtraWhitespace ctermbg=red guibg=red
:autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\\t/
" Show linenumbers
set number
set ruler
" highlight the current line
"set cursorline
" Highlight active column
"set cuc cul
" Theme related
set t_Co=256
" Set encoding
set encoding=utf-8
" Whitespace stuff
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
" indent lines
"set ts=1 sw=1 noet
"let g:indent_guides_lines_size=1
let g:indent_guides_color_change_percent = 70
let g:indent_guides_guide_size=1
let g:indent_guides_enable_on_vim_startup=0
let g:indent_guides_auto_colors=1
"autocmd VimEnter,ColorScheme * :hi IndentGuidesOdd guibg=red ctermbg=white
"autocmd VimEnter,ColorScheme * :hi IndentGuidesEven guibg=green ctermbg=lightgray
"set background=light
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment