Last active
August 29, 2015 14:10
-
-
Save rreas/2ceaca74c435039c5865 to your computer and use it in GitHub Desktop.
Monolithic .vimrc
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
if has('vim_starting') | |
set nocompatible " Be iMproved | |
" Required: | |
set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
endif | |
" Required: | |
call neobundle#begin(expand('~/.vim/bundle/')) | |
" Let NeoBundle manage NeoBundle | |
" Required: | |
NeoBundleFetch 'Shougo/neobundle.vim' | |
" My Bundles here: | |
" Refer to |:NeoBundle-examples|. | |
" Note: You don't set neobundle setting in .gvimrc! | |
NeoBundle 'tpope/vim-endwise' | |
NeoBundle 'tpope/vim-sensible' | |
NeoBundle 'kien/ctrlp.vim' | |
NeoBundle 'jlanzarotta/bufexplorer' | |
NeoBundle 'altercation/vim-colors-solarized' | |
NeoBundle 'pangloss/vim-javascript' | |
NeoBundle 'kchmck/vim-coffee-script' | |
NeoBundle 'tpope/vim-haml' | |
NeoBundle 'junegunn/vim-easy-align' | |
NeoBundle 'slim-template/vim-slim' | |
NeoBundle 'digitaltoad/vim-jade' | |
call neobundle#end() | |
" Required: | |
filetype plugin indent on | |
" If there are uninstalled bundles found on startup, | |
" this will conveniently prompt you to install them. | |
NeoBundleCheck | |
set shell=/usr/local/bin/zsh | |
set number | |
set cursorline | |
set hlsearch | |
set smartcase | |
set ignorecase | |
set expandtab | |
set autoindent | |
set smartindent | |
set relativenumber | |
set hidden | |
set textwidth=80 | |
set clipboard=unnamed | |
let &colorcolumn=join(range(81,999),",") | |
" Always use 2 spaces. | |
set shiftwidth=2 | |
set tabstop=2 | |
" Ignore some files in ctrl-p | |
set wildignore+=*/tmp/*,*/vendor/bundle/* | |
let g:ctrlp_custom_ignore = 'node_modules\|bower_components\|vendor' | |
" Global directory for undo files. | |
set undofile | |
set undodir^=~/.vim/undo | |
" With syntax group debugging. | |
set statusline= " clear the statusline for when vimrc is reloaded | |
set statusline+=\ " single space | |
set statusline+=%f\ " file name | |
set statusline+=[%{strlen(&ft)?&ft:'none'}] " filetype | |
set statusline+=%h%m%r%w " flags | |
set statusline+=%= " right align | |
set statusline+=%P | |
" File encding. | |
set encoding=utf-8 | |
" Where to store swap files. | |
set directory=/tmp,/var/tmp,. | |
" Set mapleader to an easier key. | |
let mapleader="," | |
let maplocalleader="," | |
" Themes... | |
set background=light | |
colorscheme solarized | |
" Well... | |
nnoremap ; : | |
vnoremap ; : | |
map <leader>ev :vsplit $MYVIMRC<cr> | |
map <leader>sv :source $MYVIMRC<cr> | |
map <Leader>i mmgg=G`m<CR> | |
" Normal mode | |
nnoremap H ^ | |
nnoremap L $ | |
" Insert mode | |
inoremap jk <esc> | |
" Visual mode | |
vmap <Enter> <Plug>(EasyAlign)* | |
" Remove trailing whitespace | |
au BufWritePre * :%s/\s\+$//e | |
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
########################### | |
# Configuration | |
########################### | |
# use 256 term for pretty colors | |
set -g default-terminal "screen-256color" | |
# default command - use zsh shell | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# increase scroll-back history | |
set -g history-limit 10000 | |
# use vim key bindings | |
setw -g mode-keys vi | |
# decrease command delay (increases vim responsiveness) | |
set -sg escape-time 1 | |
# increase repeat time for repeatable commands | |
set -g repeat-time 200 | |
# start window index at 1 | |
set -g base-index 1 | |
# start pane index at 1 | |
setw -g pane-base-index 1 | |
# do not highlight window when it has new activity | |
setw -g monitor-activity off | |
set -g visual-activity off | |
# re-number windows when one is closed | |
set -g renumber-windows on | |
# allow renaming and don't change when running a process | |
set-option -g allow-rename off | |
# enable pbcopy and pbpaste | |
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/blob/master/README.md | |
########################### | |
# Key Bindings | |
########################### | |
# tmux prefix | |
unbind C-b | |
set -g prefix C-a | |
bind C-a send-prefix | |
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
# copy with 'enter' or 'y' and send to mac os clipboard: http://goo.gl/2Bfn8 | |
unbind -t vi-copy Enter | |
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" | |
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
# create 'v' alias for selecting text | |
bind-key -t vi-copy v begin-selection | |
# paste | |
unbind C-p | |
bind C-p paste-buffer | |
# window splitting | |
bind | split-window -h | |
bind - split-window -v | |
# resize panes | |
bind -r h select-pane -L | |
bind -r j select-pane -D | |
bind -r k select-pane -U | |
bind -r l select-pane -R | |
bind -r H resize-pane -L 5 | |
bind -r J resize-pane -D 5 | |
bind -r K resize-pane -U 5 | |
bind -r L resize-pane -R 5 | |
# select window | |
bind -r C-h select-window -t :- | |
bind -r C-l select-window -t :+ | |
########################### | |
# Status Bar | |
########################### | |
# enable UTF-8 support in status bar | |
set -g status-utf8 on | |
# set refresh interval for status bar | |
set -g status-interval 30 | |
# center the status bar | |
set -g status-justify left | |
# show status | |
set -g status-left "[#S-#P]" | |
set -g status-right "[%b %d (%a) %R]" | |
set -g status-interval 60 | |
set -g status-left-length 40 | |
set -g status-right-length 100 | |
# show hostname, date, time, and battery in right status bar | |
set-option -g status-right '%m/%d/%y %I:%M' | |
#[fg=red]#(battery discharging)#[default]#(battery charging)' | |
########################### | |
# Mouse | |
########################### | |
setw -g mode-mouse off | |
#### COLOUR (Solarized light) | |
# default statusbar colors | |
set-option -g status-bg colour231 #base2 | |
set-option -g status-fg colour130 #yellow | |
set-option -g status-attr default | |
# default window title colors | |
set-window-option -g window-status-fg colour180 #base00 | |
set-window-option -g window-status-bg default | |
#set-window-option -g window-status-attr dim | |
# active window title colors | |
set-window-option -g window-status-current-fg colour196 #orange | |
set-window-option -g window-status-current-bg default | |
#set-window-option -g window-status-current-attr bright | |
# pane border | |
set-option -g pane-border-fg colour231 #base2 | |
set-option -g pane-active-border-fg colour051 #base1 | |
# message text | |
set-option -g message-bg colour231 #base2 | |
set-option -g message-fg colour196 #orange | |
# pane number display | |
set-option -g display-panes-active-colour colour20 #blue | |
set-option -g display-panes-colour colour196 #orange | |
# clock | |
set-window-option -g clock-mode-colour colour40 #green |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment