Skip to content

Instantly share code, notes, and snippets.

@gseitz
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gseitz/ff479a8796bbcb35c91d to your computer and use it in GitHub Desktop.
Save gseitz/ff479a8796bbcb35c91d to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved
filetype off " required!
if has('vim_starting')
set nocompatible " Be iMproved
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#rc(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
NeoBundleFetch 'Shougo/neobundle.vim'
" Recommended to install
NeoBundle 'Shougo/vimproc', {
\ 'build' : {
\ 'windows' : 'make -f make_mingw32.mak',
\ 'cygwin' : 'make -f make_cygwin.mak',
\ 'mac' : 'make -f make_mac.mak',
\ 'unix' : 'make -f make_unix.mak',
\ },
\ }
NeoBundle 'Shougo/vimproc.vim'
" Haskell
NeoBundle 'eagletmt/ghcmod-vim'
NeoBundle 'Shougo/neocomplete.vim'
NeoBundle 'eagletmt/neco-ghc'
NeoBundle 'scrooloose/syntastic'
NeoBundle 'Twinside/vim-syntax-haskell-cabal'
NeoBundle 'Twinside/vim-hoogle'
set encoding=utf-8
filetype plugin indent on
syntax on
set tags+=TAGS
set tags+=codex.tags
nnoremap ; :
let mapleader=","
set timeoutlen=1000 ttimeoutlen=0
" Check'n'Lint after buffer write
autocmd BufWritePost *.hs GhcModCheckAndLintAsync
noremap <leader>ht :GhcModType<CR>
noremap <leader>hc :GhcModTypeClear<CR>
noremap <leader>hs :%!stylish-haskell<CR>
noremap <leader>h/ 0i-- <ESC>
map <F2> :exec ":!hasktags -x -c --ignore src"<CR><CR>
" rebuild hasktags after saving
"au BufWritePost *.hs silent! :exec ":!hasktags -x -c --ignore src"
let g:necoghc_enable_detailed_browse = 1
let g:syntastic_auto_loc_list = 2
" NEOCOMPLETE *******************
let g:acp_enableAtStartup = 0
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#force_overwrite_completefunc = 1
let g:neocomplete#enable_fuzzy_completion = 1
let g:neocomplete#enable_smart_case = 1
let g:neocomplete#sources#syntax#min_keyword_length = 3
let g:neocomplete#lock_buffer_name_pattern = '\*ku\*'
inoremap <expr><C-g> neocomplete#undo_completion()
inoremap <expr><C-l> neocomplete#complete_common_string()
" *******************************
" CtrlP **********************
let g:ctrlp_custom_ignore = {
\ 'file': '\v\.(hi|o|p_o|p_hi)|tags|cabal.sandbox.config$',
\ 'dir': '\vdist|.cabal.sandbox'
\ }
let g:ctrlp_extensions = ['tag']
map <leader>f :CtrlP pwd<CR>
map <leader>b :CtrlPBuffer<CR>
map <leader>g :CtrlPTag<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment