Skip to content

Instantly share code, notes, and snippets.

@loriopatrick
Created September 24, 2016 19:42
Show Gist options
  • Save loriopatrick/9dc473da4513d05bb42189d0418d9a21 to your computer and use it in GitHub Desktop.
Save loriopatrick/9dc473da4513d05bb42189d0418d9a21 to your computer and use it in GitHub Desktop.
dotenv
set -g default-terminal "xterm"
set -sg escape-time 0
# Use C-a as prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# Allow mouse scrolling
setw -g mode-mouse on
bind r source-file ~/.tmux.conf
bind h select-pane -L
bind l select-pane -R
bind k select-pane -U
bind j select-pane -D
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse-select-window on
set -g mouse-select-pane on
set -g mouse-resize-pane on
# vim like selection
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
######################
### DESIGN CHANGES ###
######################
# panes
set -g pane-border-fg black
set -g pane-active-border-fg brightred
## Status bar design
# status line
set -g status-utf8 on
set -g status-justify left
set -g status-bg default
set -g status-fg colour12
set -g status-interval 2
# messaging
set -g message-fg black
set -g message-bg yellow
set -g message-command-fg blue
set -g message-command-bg black
#window mode
setw -g mode-bg colour6
setw -g mode-fg colour0
# window status
setw -g window-status-format " #F#I:#W#F "
setw -g window-status-current-format " #F#I:#W#F "
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
setw -g window-status-current-bg colour0
setw -g window-status-current-fg colour11
setw -g window-status-current-attr dim
setw -g window-status-bg green
setw -g window-status-fg black
setw -g window-status-attr reverse
# Info on left (I don't have a session display for now)
set -g status-left ''
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
set -g default-terminal "screen-256color"
# The modes {
setw -g clock-mode-colour colour135
setw -g mode-attr bold
setw -g mode-fg colour196
setw -g mode-bg colour238
# }
# The panes {
set -g pane-border-bg colour235
set -g pane-border-fg colour238
set -g pane-active-border-bg colour236
set -g pane-active-border-fg colour51
# }
# The statusbar {
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour137
set -g status-attr dim
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-fg colour81
setw -g window-status-current-bg colour238
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-fg colour138
setw -g window-status-bg colour235
setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-attr bold
setw -g window-status-bell-fg colour255
setw -g window-status-bell-bg colour1
# }
# The messages {
set -g message-attr bold
set -g message-fg colour232
set -g message-bg colour166
# }
set hidden
filetype off " required
" set the runtime path to include Vundle and initialize
call plug#begin('~/.vim/plugged')
Plug 'bling/vim-airline' " cool status bar
Plug 'airblade/vim-gitgutter' " git file changes
Plug 'scrooloose/nerdtree' " file explorer
Plug 'editorconfig/editorconfig-vim' " linting
" Lang Support
Plug 'othree/yajs.vim'
Plug 'groenewege/vim-less'
Plug 'JuliaLang/julia-vim'
Plug 'exu/pgsql.vim'
Plug 'udalov/kotlin-vim'
Plug 'wting/rust.vim'
" Colors
Plug 'vim-scripts/summerfruit256.vim'
Plug 'NLKNguyen/papercolor-theme'
Plug 'morhetz/gruvbox'
Plug 'vim-scripts/darktango.vim'
Plug 'vim-scripts/moria'
call plug#end()
filetype plugin indent on " required
" Enable postgres highlighting on .sql
let g:sql_type_default = 'pgsql'
" Speed up regex
set re=1
" Plugin Configs
let delimitMate_expand_cr = 1
let g:jsx_ext_required = 0 " jsx enable for .js files
let g:airline_powerline_fonts = 1 " use nice fonts for airline
autocmd FileType sql :let b:vimpipe_command="psql mydatabase"
autocmd FileType sql :let b:vimpipe_filetype="postgresql"
" Share clipboard between instances
set clipboard=unnamedplus
" No more swap and back files
set nobackup
set noswapfile
" Indnet suff
set autoindent
set copyindent
" Search case
set ignorecase
set smartcase
syntax on " syntax highlight
set number " show line numbers
set laststatus=2 " show airline
" Add menu add bottom for page for tab completion
set wildmenu
set wildmode=list:longest,full
" improve render speed
set ttyfast
set lazyredraw
" set theme
colorscheme gruvbox
set background=dark
" fix tab and backspace
set backspace=indent,eol,start
set tabstop=4
set shiftwidth=4
set expandtab
set cursorline " highlight current line
" Highlight search
set hlsearch
set incsearch
set smartcase
set so=5 " keep cursor 5 lines in window
set foldmethod=syntax foldlevel=999999 " set fold mode
" Open NERDTREE
nmap <C-p> :NERDTreeToggle<CR>
if has('nvim')
nmap <BS> <C-W>h
endif
" Change tab
nmap <silent> <C-h> :tabp<CR>
nmap <silent> <C-l> :tabn<CR>
imap <silent> <C-h> <ESC>:tabp<CR>
imap <silent> <C-l> <ESC>:tabn<CR>
" Resize window commands
nnoremap <silent> + :exe "resize " . (winheight(0) * 8/7)<CR>
nnoremap <silent> _ :exe "resize " . (winheight(0) * 7/8)<CR>
nnoremap <silent> = :exe "vertical resize " . (winwidth(0) * 8/7)<CR>
nnoremap <silent> - :exe "vertical resize " . (winwidth(0) * 7/8)<CR>
" Quit commands
nmap <S-s> :write<CR>
nmap <S-q> :qall<CR>
nmap <S-w> :q<CR>
" Clear search highlight
nmap <silent> <S-m> :nohl<CR>
" Move quickly
nmap <S-j> jjjj
nmap <S-k> kkkk
vmap <S-j> jjjj
vmap <S-k> kkkk
nmap <S-l> $
vmap <S-h> ^
vmap <S-l> $
nmap <S-h> ^
" Go to end of line
inoremap <S-Tab> <Esc><S-a>
nnoremap <S-Tab> $
" Enable spell check
" noremap <C-s> :set spell!<CR>
" set spelllang=en_us
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment