Created
December 21, 2015 01:58
-
-
Save brannon/24645ac971eb5d41ddff to your computer and use it in GitHub Desktop.
VIM Settings
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
" Most of this config was lifted from http://jsdelfino.blogspot.com/2010/11/my-vi-configuration-file.html | |
" vi-improved mode | |
set nocompatible | |
filetype on | |
filetype plugin on | |
filetype indent on | |
" cycle buffers without writing | |
set hidden | |
" backup while writing | |
set writebackup | |
" file completion | |
set wildmenu | |
set wildmode=list:longest | |
" update window title | |
set title | |
" display cursor location | |
set ruler | |
set number | |
set scrolloff=7 | |
" Statusline | |
" https://github.com/pengwynn/dotfiles/blob/master/vim/vimrc.symlink#L160 | |
set statusline= " Override default | |
set statusline+=%1*%{fugitive#statusline()[4:-2]}%* " Show fugitive git info | |
set statusline+=%2*\ %f\ %m\ %r%* " Show filename/path | |
set statusline+=%3*%=%* " Set right-side status info after this line | |
set statusline+=%4*%l/%L:%v%* " Set <line number>/<total lines>:<column> | |
set statusline+=%5*\ %* " Set ending space | |
" short message prompts | |
set shortmess=atI | |
" silent | |
set noerrorbells | |
set novisualbell | |
" switch to current file's directory | |
set autochdir | |
" remember marks, registers, searches, buffer list | |
set viminfo='20,<50,s10,h,% | |
" keep a big history | |
set history=1000 | |
" syntax highligting | |
syntax on | |
set list | |
set listchars=nbsp:¬,tab:»·,trail:· | |
" auto smart code indent | |
set autoindent | |
filetype indent on | |
set smartindent | |
set smarttab | |
set tabstop=4 | |
set softtabstop=4 | |
set expandtab | |
set shiftwidth=4 | |
set shiftround | |
" allow backspacing in insert mode | |
set backspace=indent,eol,start | |
" incremental search | |
set incsearch | |
set nohlsearch | |
" ignore case | |
set ignorecase | |
set smartcase | |
" Reload changes to .vimrc automatically | |
autocmd BufWritePost ~/.vimrc source ~/.vimrc | |
" Explorer | |
let g:netrw_liststyle=3 | |
" ctrl-p settings | |
let g:ctrlp_map = '<c-p>' | |
" vim-markdown | |
let g:vim_markdown_folding_disabled=1 | |
" vim-plug (https://github.com/junegunn/vim-plug) | |
call plug#begin() | |
" Status bar | |
" Plug 'powerline/powerline' | |
Plug 'https://github.com/bling/vim-airline' | |
" Git plugins | |
Plug 'tpope/vim-fugitive' | |
Plug 'int3/vim-extradite' | |
" Theme | |
Plug 'fatih/molokai' | |
" Golang | |
Plug 'fatih/vim-go' | |
Plug 'nsf/gocode' | |
" Text editing | |
Plug 'godlygeek/tabular' | |
Plug 'https://github.com/plasticboy/vim-markdown.git' | |
Plug 'https://github.com/avakhov/vim-yaml.git' | |
Plug 'pangloss/vim-javascript' | |
Plug 'beautify-web/js-beautify' | |
Plug 'elzr/vim-json' | |
call plug#end() | |
" autocommands | |
au! BufRead,BufNewFile *.json set filetype=json | |
au! BufRead,BufNewFile *.go set filetype=go | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment