Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- call plug#begin('~/.vim/plugged')
- Plug 'Raimondi/delimitMate'
- Plug 'Shougo/vimproc.vim', {'do' : 'make'}
- Plug 'SirVer/ultisnips'
- Plug 'chrisbra/Colorizer'
- Plug 'eagletmt/ghcmod-vim'
- Plug 'eagletmt/neco-ghc'
- Plug 'Valloric/YouCompleteMe'
- Plug 'honza/vim-snippets'
- Plug 'vim-airline/vim-airline'
- Plug 'vim-airline/vim-airline-themes'
- Plug 'ervandew/supertab'
- Plug 'thinca/vim-quickrun'
- Plug 'tpope/vim-commentary'
- Plug 'tpope/vim-fireplace'
- Plug 'tpope/vim-fugitive'
- Plug 'tpope/vim-repeat'
- Plug 'junegunn/fzf.vim'
- Plug 'tpope/vim-surround'
- Plug 'tpope/vim-vinegar'
- Plug 'ap/vim-buftabline'
- Plug 'w0rp/ale'
- Plug 'challenger-deep-theme/vim', { 'as': 'challenger-deep' }
- Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
- Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
- Plug 'fsharp/vim-fsharp', {
- \ 'for': 'fsharp',
- \ 'do': 'make fsautocomplete',
- \}
- " Initialize plugin system
- call plug#end()
- " general stuff
- filetype plugin indent on
- let mapleader=","
- set clipboard=unnamed
- set autoindent
- set smarttab
- set tabstop=8
- set softtabstop=4
- set shiftwidth=4
- set expandtab
- set backspace=indent,eol,start
- set mouse=a
- set guioptions-=m "remove menu bar
- set guioptions-=T "remove toolbar
- set guioptions-=L "remove left-hand scroll bar
- set guioptions-=r "remove right-hand scroll bar
- augroup StripSpace
- autocmd BufWritePre * :%s/\s\+$//e
- augroup END
- " autorefresh files
- set autoread
- set directory=$HOME/.vim/swapfiles//
- set autochdir
- " linenumbers
- set number
- set relativenumber
- " keybindings
- imap jk <Esc>
- inoremap <Nul> <C-Space>
- nnoremap <C-Tab> :bnext<CR>
- vmap > >gv
- vmap < <gv
- " Linting with Ale
- " highlight errors in red
- highlight link ALEErrorLine error
- " delay linting
- let g:ale_lint_delay = 1000
- " airline integration
- let g:airline#extensions#ale#enabled = 1
- " completion with YouCompleteMe
- " make YCM compatible with UltiSnips (using supertab)
- let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
- let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
- let g:SuperTabDefaultCompletionType = '<C-n>'
- " better key bindings for UltiSnipsExpandTrigger
- let g:UltiSnipsExpandTrigger = "<tab>"
- let g:UltiSnipsJumpForwardTrigger = "<tab>"
- let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
- " fzf
- " respect colorscheme
- let g:fzf_colors =
- \ { 'fg': ['fg', 'Normal'],
- \ 'bg': ['bg', 'Normal'],
- \ 'hl': ['fg', 'Comment'],
- \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
- \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
- \ 'hl+': ['fg', 'Statement'],
- \ 'info': ['fg', 'PreProc'],
- \ 'border': ['fg', 'Ignore'],
- \ 'prompt': ['fg', 'Conditional'],
- \ 'pointer': ['fg', 'Exception'],
- \ 'marker': ['fg', 'Keyword'],
- \ 'spinner': ['fg', 'Label'],
- \ 'header': ['fg', 'Comment'] }
- " delimitMate
- let g:delimitMate_expand_cr = 1
- let g:delimitMate_expand_space = 1
- " bind file search
- nnoremap <c-p> :FZF ~<CR>
- nnoremap <leader>a :Ag<CR>
- " automatically close scratch buffer
- let g:ycm_autoclose_preview_window_after_insertion = 1
- let g:ycm_autoclose_preview_window_after_completion = 1
- " fonts & colors
- set termguicolors
- set background=dark
- colo challenger_deep
- syntax on
- set guifont=Ubuntu\ Mono\ 13
- " Fsharp
- let g:fsharp_only_check_errors_on_write = 1
- let g:fsharp_completion_helptext = 1
- let g:fsharp_helptext_comments = 1
- " C++
- let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py'
- " Ruby
- augroup Ruby
- autocmd!
- autocmd FileType ruby setlocal shiftwidth=2 tabstop=2
- augroup END
- " Haskell
- let g:haskellmode_completion_ghc = 0
- augroup Haskell
- autocmd!
- autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
- autocmd BufWritePost *.hs silent! !brittany --write-mode inplace <afile>
- augroup END
- " custom haskell keybindings
- au Filetype haskell nnoremap <Leader>t :GhcModTypeInsert<CR>
- au Filetype haskell nnoremap <Leader>s :GhcModSplitFunCase<CR>
- au FileType haskell nnoremap <buffer> <F1> :HdevtoolsType<CR>
- au FileType haskell nnoremap <buffer> <silent> <F2> :HdevtoolsClear<CR>
- au FileType haskell nnoremap <buffer> <silent> <F3> :HdevtoolsInfo<CR>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement