Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
80 lines (60 sloc) 2.63 KB
" https://github.com/tpope/vim-pathogen
call pathogen#infect()
" The set nocompatible setting makes vim behave in a more useful way (the default) than the vi-compatible manner.
" http://www.linuxfromscratch.org/lfs/view/development/chapter06/vim.html
set nocompatible
set cursorline
set expandtab
set tabstop=2
set shiftwidth=2
" To highlight all search matches
set hlsearch
filetype plugin on
filetype plugin indent on
set autoindent
" configure Vim so that it sets the working directory to the current file's directory
" http://superuser.com/questions/195022
autocmd BufEnter * lcd %:p:h
" This will check the current folder for tags file and keep going one directory up all the way to the root folder.
" SO you can be in any sub-folder in your project and it'll be able to find the tags files.
" http://stackoverflow.com/questions/5017500
set tags=tags;/
" Disable the bell in MacVim
set vb
" https://github.com/altercation/vim-colors-solarized
syntax enable
set background=light
colorscheme solarized
au BufNewFile,BufRead *.rb set tabstop=2 shiftwidth=2 colorcolumn=80,100 expandtab
au BufNewFile,BufRead *.css set tabstop=2 shiftwidth=2 colorcolumn=80,100 expandtab
au BufNewFile,BufRead *.scss set tabstop=2 shiftwidth=2 colorcolumn=80,100 expandtab
au BufNewFile,BufRead *.js set tabstop=2 shiftwidth=2 colorcolumn=80,100 expandtab
au BufNewFile,BufRead *.jsx set tabstop=2 shiftwidth=2 colorcolumn=80,100 expandtab
au BufNewFile,BufRead *.py set tabstop=2 shiftwidth=2 colorcolumn=80,100 expandtab
" au FileType gitcommit set colorcolumn=50,72
au FileType gitcommit set colorcolumn=72 " Yerdle
" Add dash to autocomplete (for class names and IDs)
" http://stackoverflow.com/questions/9336113
autocmd FileType jsx,html,css,scss set iskeyword+=-
" Automatically cd into the directory that the file is in
autocmd BufEnter * execute "chdir ".escape(expand("%:p:h"), ' ')
" Remove any trailing whitespace that is in the file
autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif
" This shows what you are typing as a command. I love this!
set showcmd
" the default red doesnt play well with certain syntax highlighters
" highlight ColorColumn ctermbg=LightRed guibg=LightRed
" http://stackoverflow.com/questions/2287440
set smartcase
" Syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_loc_list_height = 5
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 1
let g:syntastic_javascript_checkers = ['eslint']
" https://github.com/vim-airline/vim-airline-themes
let g:airline_theme='solarized'