You need to get vundle setup first
Then :BundleInstall from inside vim
And then setup all your external tools...
OCaml:
- merlin
- ocp-indent
Go:
- See docs for the included Go plugin
set nocompatible | |
filetype off | |
" Vundle and its packages | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
" Sensible defaults | |
Plugin 'tpope/vim-sensible' | |
" git | |
Plugin 'tpope/vim-fugitive' | |
" general OCaml support (mainly highlighting) | |
Plugin 'rgrinberg/vim-ocaml' | |
" Better OCaml indentation | |
Plugin 'def-lkb/ocp-indent-vim' | |
" (better) tab completion | |
Plugin 'ervandew/supertab' | |
" syntastic | |
Plugin 'scrooloose/syntastic' | |
" Commenting and uncommenting blocks | |
Plugin 'scrooloose/nerdcommenter' | |
" Better status line | |
Plugin 'bling/vim-airline' | |
" colors! | |
Plugin 'flazz/vim-colorschemes' | |
" rust | |
Plugin 'rust-lang/rust.vim' | |
Plugin 'racer-rust/vim-racer' | |
" Go | |
Plugin 'fatih/vim-go' | |
call vundle#end() | |
" General vim setup | |
set hidden | |
set expandtab | |
set softtabstop=4 | |
set shiftwidth=4 | |
set t_Co=256 | |
colo twilight256 | |
" Key bindings | |
" Reformat the current paragraph | |
nnoremap Q gq | |
vnoremap Q gq | |
" Plugin setup | |
" merlin | |
let g:opamshare = substitute(system('opam config var share'),'[\r\n]*$','','') | |
execute "set rtp+=" . g:opamshare . "/merlin/vim" | |
" ocp-indent | |
"execute "set rtp^=" . g:opamshare . "/ocp-indent/vim" | |
set rtp^=~/.vim/bundle/ocp-indent-vim/ | |
nnoremap <Leader>i gg=G'' | |
" syntastic | |
set statusline+=%#warningmsg# | |
set statusline+=%{SyntasticStatuslineFlag()} | |
set statusline+=%* | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_auto_loc_list = 1 | |
" Automatically jump to errors/warnings - equal parts useful and annoying | |
"let g:syntastic_auto_jump = 1 | |
let g:syntastic_check_on_open = 1 | |
let g:syntastic_check_on_wq = 0 | |
let g:syntastic_ocaml_checkers = ['merlin'] | |
" Makefile stuff | |
" Don't expand tabs for Makefiles | |
au FileType makefile setlocal noexpandtab | |
" OCaml stuff | |
au BufRead,BufNewFile *.ml,*.mli compiler ocaml | |
au FileType ocaml setlocal softtabstop=2 | |
au FileType ocaml setlocal shiftwidth=2 | |
au FileType ocaml call SuperTabSetDefaultCompletionType("<c-x><c-o>") | |
" Rust stuff -- uncomment and update as appropriate | |
"set hidden -- ALREADY SET ELSEWHERE | |
"let g:racer_cmd = '/Users/hcarty/external/racer/target/release/racer' | |
"let $RUST_SRC_PATH='/Users/hcarty/external/rust/src/rustc-1.3.0/src/' | |
"au FileType rust call SuperTabSetDefaultCompletionType("<c-x><c-o>") | |
" bash stuff | |
au BufRead,BufNewFile *bash* let g:is_bash=1 | |
au BufRead,BufNewFile *bash* setf sh |