Created
August 25, 2015 14:29
-
-
Save chemist/06bd26cc79ea063782b4 to your computer and use it in GitHub Desktop.
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
set nocompatible " be iMproved, required | |
set backspace=2 | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#rc() | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'rizzatti/dash.vim' | |
Plugin 'chemist/cutenes' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'Shougo/neocomplcache.vim' | |
Plugin 'eagletmt/neco-ghc' | |
"Plugin 'Shougo/deoplete.nvim' | |
Plugin 'bitc/vim-hdevtools' | |
Plugin 'Twinside/vim-hoogle' | |
Plugin 'vim-scripts/hlint' | |
Plugin 'majutsushi/tagbar' | |
" go | |
Plugin 'fatih/vim-go' | |
" rust | |
Plugin 'rust-lang/rust.vim' | |
Plugin '[email protected]:raichoo/purescript-vim.git' | |
set ttyfast | |
set lazyredraw | |
" syntastic | |
au FileType haskell nnoremap <silent> ,e :call EToggle()<CR> | |
function! EToggle() | |
execute "Errors" | |
execute "wincmd j" | |
endfunction | |
let g:syntastic_always_populate_loc_list=1 | |
let g:syntastic_error_symbol='✗' | |
let g:syntastic_warning_symbol='⚠' | |
let g:syntastic_auto_jump=0 | |
let g:syntastic_stl_format = '[%E{Err: %fe #%e}%B{, }%W{Warn: %fw #%w}]' | |
" cabal install hdevtools | |
" settings for hdevtools | |
let g:syntastic_haskell_checkers=['hdevtools'] | |
"let g:hdevtools_options = '-g -isrc' | |
au FileType haskell nnoremap <buffer> ,t :HdevtoolsType<CR> | |
au FileType haskell nnoremap <buffer> ,i :HdevtoolsInfo<CR> | |
au FileType haskell nnoremap <buffer> <silent> <F2> :HdevtoolsClear<CR> | |
let g:jsbeautify_engine = "node" | |
let g:htmlbeautify = {'indent_size': 2, 'indent_char': ' ', 'max_char': 78, 'brace_style': 'expand', 'unformatted': ['a', 'sub', 'sup', 'b', 'i', 'u']} | |
autocmd FileType javascript noremap <buffer> <c-f> :call JsBeautify()<cr> | |
" for html | |
autocmd FileType html noremap <buffer> <c-f> :call HtmlBeautify()<cr> | |
" " for css or scss | |
autocmd FileType css noremap <buffer> <c-f> :call CSSBeautify()<cr> | |
" cabal install stylish-haskell | |
" ctrl - f for stylish | |
autocmd FileType haskell noremap <buffer> ,f :call StylishHaskell()<cr> | |
"hoogle | |
autocmd FileType haskell map ,h :Dash<cr> | |
autocmd FileType haskell map ,c :Hlint()<cr> | |
let $PATH = $PATH . ':' . expand("~/.bin") | |
filetype plugin indent on | |
" haskell autocomplete | |
" cabal install ghc-mod | |
let g:neocomplcache_enable_at_startup = 1 | |
let g:neocomplcache_enable_smart_case = 1 | |
let g:acp_enableAtStartup = 0 | |
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" | |
let g:necoghc_enable_detailed_browse = 1 | |
map <F8> :NERDTreeToggle<CR> | |
let NERDTreeQuitOnOpen = 1 | |
let NERDTreeShowBookmarks = 1 | |
au BufEnter *.hs map <F9> :!cabal install<CR> | |
au BufEnter *.dats set syntax=ats | |
au BufEnter *.rs map <F9> :!cargo run<CR> | |
set tabstop=4 | |
set shiftwidth=4 | |
set foldcolumn=1 | |
set expandtab | |
set nowrap | |
set showmatch | |
"set relativenumber | |
set number | |
syntax on | |
function! FindCabalSandboxRoot() | |
let sandboxdir = finddir('.cabal-sandbox', './;') | |
if len(sandboxdir) - 14 | |
return glob('~/.ghc/x86*/package.conf.d') | |
else | |
return glob(sandboxdir.'/*-packages.conf.d') | |
endif | |
endfunction | |
"let g:hdevtools_options = '-g-ilib -g-isrc -g-i. -g-idist/build/autogen -g-package-conf='.FindCabalSandboxRoot() | |
"let g:syntastic_haskell_hdevtools_args = g:hdevtools_options | |
" use ghc functionality for haskell files | |
let g:ghc="/usr/bin/ghc" | |
augroup filetype_hs | |
autocmd! | |
autocmd Bufenter *.hs let dir = FindCabalSandboxRoot() | |
"autocmd Bufenter *.hs compiler ghc | |
autocmd Bufenter *.hs let b:ghc_staticoptions = '-package-db ' . dir | |
autocmd Bufenter *.hs let g:ghcmod_ghc_options = ['-package-db ' . dir] | |
augroup END | |
" | |
" go | |
au FileType go nmap ,r <Plug>(go-run) | |
au FileType go nmap ,b <Plug>(go-build) | |
au FileType go nmap ,d <Plug>(go-doc) | |
" indent | |
let g:haskell_indent_where = 6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment