Last active
December 11, 2015 07:08
-
-
Save stengland/4563815 to your computer and use it in GitHub Desktop.
My vim config.
This file contains hidden or 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
| " General "{{{ | |
| set nocompatible " be i\;Mproved | |
| " set timeoutlen=500 " Time to wait after ESC (default causes an annoying delay) | |
| set shell=/bin/zsh | |
| set nowritebackup | |
| set directory=/tmp// " prepend(^=) $HOME/.tmp/ to default path; use full path as backup filename(//) | |
| set noswapfile | |
| set hidden " The current buffer can be put to the background without writing to disk | |
| set hlsearch " highlight search | |
| set ignorecase " be case insensitive when searching | |
| set smartcase " be case sensitive when input has a capital letter | |
| set incsearch " show matches while typing | |
| set mouse= " enable mouse in GUI mode | |
| set spelllang=en_gb " Set region to British English | |
| set clipboard=unnamed,unnamedplus " Use systemclipboard | |
| " "}}} | |
| " Formatting "{{{ | |
| set textwidth=80 " Don't wrap lines by default | |
| set tabstop=2 " tab size eql 2 spaces | |
| set softtabstop=2 | |
| set shiftwidth=2 " default shift width for indents | |
| set expandtab " replace tabs with ${tabstop} spaces | |
| set smarttab | |
| set backspace=indent | |
| set backspace+=eol | |
| set backspace+=start | |
| set autoindent | |
| " Colour column | |
| set cc=+1 | |
| hi ColorColumn ctermbg=lightgrey | |
| " Automatically strip all trailing white space | |
| autocmd BufWritePre * :%s/\s\+$//e | |
| " Automatically source vimrc when modified | |
| autocmd BufWritePost .vimrc source $MYVIMRC | |
| " "}}} | |
| " Visual "{{{ | |
| set list " Show hidden characters | |
| " Use the same symbols as TextMate for tabstops and EOLs | |
| set listchars=tab:▸\ ,eol:¬ | |
| set showcmd " display an incomplete command in statusline | |
| set number | |
| set laststatus=2 " alway show staus line | |
| set background=dark | |
| let base16colorspace=256 | |
| " "}}} | |
| " Keymapings "{{{ | |
| " Shortcut to rapidly toggle `set list` | |
| nmap <silent> <leader>l :set list!<CR> | |
| " Toggle spell checking on and off with `\s` | |
| nmap <silent> <leader>s :set spell!<CR> | |
| " Open vimrc in new tab | |
| nmap <leader>v :tabedit $MYVIMRC<CR> | |
| " Search word under cursor in ack | |
| nmap <leader>aa "zyiw:exe ":Ack! ".@z.""<CR> | |
| " JSON pretty print | |
| nmap <leader>jpp <Esc>:%!jsonpp<CR> | |
| " dispath | |
| nmap <leader>d :w<CR> :Dispatch<CR> | |
| " Commit all | |
| nmap <leader>c :Gcommit -a<CR> | |
| " "}}} | |
| " Abbreviations | |
| abbr flase false | |
| " Scripts and Bundles " {{{ | |
| filetype off " required! | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| " let Vundle manage Vundle | |
| " required! | |
| Bundle 'gmarik/vundle' | |
| " My Bundles here: | |
| Bundle 'vim-ruby/vim-ruby' | |
| Bundle 'tpope/vim-rbenv' | |
| Bundle 'tpope/vim-fugitive' | |
| Bundle 'tpope/vim-markdown' | |
| Bundle 'tpope/vim-haml' | |
| Bundle 'tpope/vim-bundler' | |
| Bundle 'tpope/vim-rails' | |
| Bundle 'digitaltoad/vim-jade' | |
| Bundle 'jkramer/vim-checkbox' | |
| Bundle 'jtratner/vim-flavored-markdown' | |
| Bundle 'airblade/vim-gitgutter' | |
| Bundle 'vim-scripts/loremipsum' | |
| Bundle 'mattn/webapi-vim' | |
| Bundle 'mattn/gist-vim' | |
| Bundle 'kchmck/vim-coffee-script' | |
| Bundle 'AndrewRadev/vim-eco' | |
| Bundle 'derekwyatt/vim-scala' | |
| Bundle 'tpope/vim-tbone' | |
| Bundle 'jgdavey/vim-turbux' | |
| Bundle 'christoomey/vim-tmux-navigator' | |
| Bundle 'danro/rename.vim' | |
| Bundle 'kien/ctrlp.vim' | |
| set runtimepath^=~/.vim/bundle/ctrlp.vim | |
| Bundle 'chriskempson/base16-vim' | |
| colorscheme base16-default | |
| Bundle 'EasyGrep' | |
| Bundle 'mileszs/ack.vim' | |
| Bundle 'tpope/vim-surround' | |
| Bundle 'tpope/vim-ragtag' | |
| Bundle 'tpope/vim-commentary' | |
| Bundle 'tpope/vim-unimpaired' | |
| Bundle 'othree/html5.vim' | |
| Bundle 'tpope/vim-dispatch' | |
| Bundle 'ecomba/vim-ruby-refactoring' | |
| Bundle 'tmhedberg/matchit' | |
| " Snipmate and dependencies | |
| Bundle "MarcWeber/vim-addon-mw-utils" | |
| Bundle "tomtom/tlib_vim" | |
| Bundle "garbas/vim-snipmate" | |
| Bundle "honza/vim-snippets" | |
| Bundle 'bling/vim-airline' | |
| Bundle 'edkolev/tmuxline.vim' | |
| filetype plugin indent on " Automatically detect file types. required! | |
| syntax enable | |
| " Airline conf | |
| let g:airline_powerline_fonts = 1 | |
| let g:airline#extensions#tabline#enabled = 1 | |
| " " }}} | |
| " GistID: 4563815 " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment