Created
May 23, 2015 20:52
-
-
Save pythonandchips/cfed3d3dc5f17b2c445b to your computer and use it in GitHub Desktop.
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
"MY VIMRC | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
Bundle 'gmarik/vundle' | |
Bundle 'matschaffer/netrw-v142' | |
Bundle 'tpope/vim-fugitive' | |
Bundle 'flazz/vim-colorschemes' | |
Bundle 'tpope/vim-abolish' | |
Bundle 'tpope/vim-surround' | |
Bundle 'sjl/gundo.vim' | |
Bundle 'Lokaltog/vim-powerline' | |
Bundle 'jgdavey/vim-blockle' | |
Bundle 'kchmck/vim-coffee-script' | |
Bundle 'tpope/vim-endwise' | |
Bundle 'tpope/vim-markdown' | |
Bundle 'vim-scripts/matchit.zip' | |
Bundle 'tpope/vim-rails' | |
Bundle 'tpope/vim-rake' | |
Bundle 'vim-ruby/vim-ruby' | |
Bundle 'ervandew/supertab' | |
Bundle 'pythonandchips/vim-handlebars' | |
Bundle 'mileszs/ack.vim' | |
Bundle 'kien/ctrlp.vim' | |
Bundle 'altercation/vim-colors-solarized' | |
Bundle 'fatih/vim-go' | |
Bundle 'majutsushi/tagbar' | |
Bundle 'xolox/vim-misc' | |
Bundle 'xolox/vim-easytags' | |
Bundle 'ekalinin/Dockerfile.vim' | |
Bundle 'scrooloose/syntastic' | |
filetype plugin indent on | |
syntax on | |
let mapleader = "," | |
let maplocalleader = "," | |
let g:ackprg="ack -H --nogroup --nogroup --column" | |
let g:go_fmt_command = "goimports" | |
let g:easytags_cmd = '/usr/local/bin/ctags' | |
let g:easytags_async = 1 | |
let g:easytags_auto_highligh = 0 | |
let g:easytags_syntax_keyword = 'none' | |
"syntatic settings | |
"set statusline+=%#warningmsg# | |
"set statusline+=%{SyntasticStatuslineFlag()} | |
"set statusline+=%* | |
" | |
"let g:syntastic_always_populate_loc_list = 1 | |
"let g:syntastic_auto_loc_list = 1 | |
"let g:syntastic_check_on_open = 1 | |
"let g:syntastic_check_on_wq = 0 | |
let g:syntastic_javascript_checkers = ["jsxhint"] | |
set grepprg="/usr/local/bin/ack" | |
set autowrite | |
set autoread | |
set ruler | |
set nu | |
set nowrap | |
set timeoutlen=1000 | |
set history=256 | |
set mousehide | |
set mouse=a | |
set ts=2 | |
set bs=2 | |
set shiftwidth=2 | |
set autoindent | |
set smarttab | |
set expandtab | |
set guioptions-=m | |
set guioptions-=T | |
set guioptions-=r | |
set guioptions-=l | |
set guioptions-=b | |
set guioptions-=T | |
set guifont=Andale\ Mono:h20 | |
set showmatch | |
set shell=/bin/sh | |
set splitright | |
set noerrorbells | |
set novisualbell | |
set listchars=tab:\ \ ,eol:$,trail:~,extends:>,precedes:< | |
nnoremap <Leader>e :Explore . <CR> | |
nnoremap <Leader>E :Explore <CR> | |
map <C-H> <C-W>h | |
map <C-J> <C-W>j | |
map <C-K> <C-W>k | |
map <C-L> <C-W>l | |
nnoremap <Leader>t :CtrlP<CR> | |
nnoremap <Leader>T :CtrlPTag<CR> | |
"map <Up> :cprev <CR> | |
"map <Down> :cnext <CR> | |
"custom mappings | |
nnoremap <Leader>r G=gg<C-o><C-o> | |
nnoremap <F5> :GundoToggle<CR> | |
nnoremap <F4> :Tagbar<CR> | |
nmap <Leader>a= :Tabularize /=<CR> | |
vmap <Leader>a= :Tabularize /=<CR> | |
nmap <Leader>a: :Tabularize /:\zs<CR> | |
vmap <Leader>a: :Tabularize /:\zs<CR> | |
"diff options | |
:set diffopt+=iwhite | |
" Strip trailing whitespace | |
function! <SID>StripTrailingWhitespaces() | |
" Preparation: save last search, and cursor position. | |
let _s=@/ | |
let l = line(".") | |
let c = col(".") | |
" Do the business: | |
%s/\s\+$//e | |
" Clean up: restore previous search history, and cursor position | |
let @/=_s | |
call cursor(l, c) | |
endfunction | |
autocmd BufWritePre * :call <SID>StripTrailingWhitespaces() | |
autocmd! bufwritepost .vimrc source ~/.vimrc | |
"set colour scheme | |
colorscheme vividchalk | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment