summaryrefslogtreecommitdiffstats
path: root/vim/.vimrc
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2015-08-21 03:14:10 -0700
committerThibaut Horel <thibaut.horel@gmail.com>2015-08-21 03:25:54 -0700
commit1212a9d32dbc809bcce679b9d36f3a233af3193e (patch)
tree0c5927010e7b51eaccc412f44f076c67971fbe61 /vim/.vimrc
parent56ce88c7944443d7e097847a6bf0dadb66859c24 (diff)
downloaddotfiles-1212a9d32dbc809bcce679b9d36f3a233af3193e.tar.gz
Switch to stow
Diffstat (limited to 'vim/.vimrc')
-rw-r--r--vim/.vimrc123
1 files changed, 123 insertions, 0 deletions
diff --git a/vim/.vimrc b/vim/.vimrc
new file mode 100644
index 0000000..11f9e42
--- /dev/null
+++ b/vim/.vimrc
@@ -0,0 +1,123 @@
+" basic plugin/ syntax support
+execute pathogen#infect()
+filetype plugin indent on
+syntax on
+
+autocmd bufwritepost .vimrc source $MYVIMRC
+
+" theming
+set t_Co=256
+set background=dark
+colorscheme molokai
+set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P
+
+set nocompatible
+
+set wrap
+set textwidth=79
+set formatoptions=qrn1
+set colorcolumn=81
+
+set modelines=0
+set tabstop=4
+set shiftwidth=4
+set softtabstop=4
+set expandtab
+set encoding=utf-8
+set scrolloff=3
+set autoindent
+set showmode
+set showcmd
+set hidden
+set wildmenu
+set wildmode=list:longest
+set visualbell
+set cursorline
+set ttyfast
+set ruler
+set backspace=indent,eol,start
+set laststatus=2
+set relativenumber
+set undofile
+set autochdir
+
+set ignorecase
+set smartcase
+set gdefault
+set incsearch
+set showmatch
+set hlsearch
+
+set backup
+set noswapfile
+
+" backups
+set undodir=~/.vim/tmp/undo//
+set backupdir=~/.vim/tmp/backup//
+set directory=~/.vim/tmp/swap//
+
+if !isdirectory(expand(&undodir))
+ call mkdir(expand(&undodir), "p")
+endif
+if !isdirectory(expand(&backupdir))
+ call mkdir(expand(&backupdir), "p")
+endif
+if !isdirectory(expand(&directory))
+ call mkdir(expand(&directory), "p")
+endif
+
+let mapleader = ","
+nnoremap <leader><space> :noh<cr>
+nnoremap <S-Tab> %
+nnoremap / /\v
+vnoremap / /\v
+nnoremap <up> <nop>
+nnoremap <down> <nop>
+nnoremap <left> <nop>
+nnoremap <right> <nop>
+inoremap <up> <nop>
+inoremap <down> <nop>
+inoremap <left> <nop>
+inoremap <right> <nop>
+nnoremap j gj
+nnoremap k gk
+nnoremap <F1> :NERDTreeToggle<cr>
+nnoremap <F2> :TagbarToggle<cr>
+nnoremap <F3> :RainbowParenthesesToggleAll<cr>
+nnoremap <c-b> :CtrlPBuffer<cr>
+noremap gV '[V']
+
+" allows for sequential indent/desindent by reselecting the text
+vnoremap < <gv
+vnoremap > >gv
+
+" easy window switching
+nnoremap <C-h> <C-w>h
+nnoremap <C-j> <C-w>j
+nnoremap <C-k> <C-w>k
+nnoremap <C-l> <C-w>l
+
+" window resizing
+nnoremap <C-left> <C-w><
+nnoremap <C-right> <C-w>>
+nnoremap <C-down> <C-w>+
+nnoremap <C-up> <C-w>-
+
+" text bubbling
+" vnoremap <C-up> xkP'[V']
+nnoremap <C-S-up> ddkP
+nnoremap <C-S-down> ddp
+" vnoremap <C-down> xp'[V']
+
+" folding
+set foldlevelstart=99
+nnoremap <Space> za
+nnoremap <S-Space> zA
+vnoremap <S-Space> zA
+
+let g:pymode_lint_write = 0
+let g:pymode_utils_whitespaces = 0
+
+autocmd CursorMovedI * if pumvisible() == 0|silent! pclose|endif
+autocmd InsertLeave * if pumvisible() == 0|silent! pclose|endif
+autocmd FileType mail set fo+=aw spell