Advertisement
Guest User

Untitled

a guest
May 3rd, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 4.14 KB | None | 0 0
  1. call plug#begin('~/.vim/plugged')
  2.  
  3. Plug 'Raimondi/delimitMate'
  4. Plug 'Shougo/vimproc.vim', {'do' : 'make'}
  5. Plug 'SirVer/ultisnips'
  6. Plug 'chrisbra/Colorizer'
  7. Plug 'eagletmt/ghcmod-vim'
  8. Plug 'eagletmt/neco-ghc'
  9. Plug 'Valloric/YouCompleteMe'
  10. Plug 'honza/vim-snippets'
  11. Plug 'vim-airline/vim-airline'
  12. Plug 'vim-airline/vim-airline-themes'
  13. Plug 'ervandew/supertab'
  14. Plug 'thinca/vim-quickrun'
  15. Plug 'tpope/vim-commentary'
  16. Plug 'tpope/vim-fireplace'
  17. Plug 'tpope/vim-fugitive'
  18. Plug 'tpope/vim-repeat'
  19. Plug 'junegunn/fzf.vim'
  20. Plug 'tpope/vim-surround'
  21. Plug 'tpope/vim-vinegar'
  22. Plug 'ap/vim-buftabline'
  23. Plug 'w0rp/ale'
  24. Plug 'challenger-deep-theme/vim', { 'as': 'challenger-deep' }
  25. Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
  26. Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
  27. Plug 'fsharp/vim-fsharp', {
  28.       \ 'for': 'fsharp',
  29.       \ 'do':  'make fsautocomplete',
  30.       \}
  31.  
  32. " Initialize plugin system
  33. call plug#end()
  34.  
  35. " general stuff
  36. filetype plugin indent on
  37. let mapleader=","
  38. set clipboard=unnamed
  39. set autoindent
  40. set smarttab
  41. set tabstop=8
  42. set softtabstop=4
  43. set shiftwidth=4
  44. set expandtab
  45. set backspace=indent,eol,start
  46. set mouse=a
  47.  
  48. set guioptions-=m  "remove menu bar
  49. set guioptions-=T  "remove toolbar
  50. set guioptions-=L  "remove left-hand scroll bar
  51. set guioptions-=r  "remove right-hand scroll bar
  52.  
  53. augroup StripSpace
  54.     autocmd BufWritePre * :%s/\s\+$//e
  55. augroup END
  56.  
  57. " autorefresh files
  58. set autoread
  59. set directory=$HOME/.vim/swapfiles//
  60. set autochdir
  61.  
  62. " linenumbers
  63. set number
  64. set relativenumber
  65.  
  66. " keybindings
  67. imap jk <Esc>
  68. inoremap <Nul> <C-Space>
  69. nnoremap <C-Tab> :bnext<CR>
  70.  
  71. vmap > >gv
  72. vmap < <gv
  73.  
  74. " Linting with Ale
  75.  
  76. " highlight errors in red
  77. highlight link ALEErrorLine error
  78. " delay linting
  79. let g:ale_lint_delay = 1000
  80. " airline integration
  81. let g:airline#extensions#ale#enabled = 1
  82.  
  83. " completion with YouCompleteMe
  84. " make YCM compatible with UltiSnips (using supertab)
  85. let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
  86. let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
  87. let g:SuperTabDefaultCompletionType = '<C-n>'
  88.  
  89. " better key bindings for UltiSnipsExpandTrigger
  90. let g:UltiSnipsExpandTrigger = "<tab>"
  91. let g:UltiSnipsJumpForwardTrigger = "<tab>"
  92. let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
  93.  
  94. " fzf
  95. " respect colorscheme
  96. let g:fzf_colors =
  97. \ { 'fg':      ['fg', 'Normal'],
  98.   \ 'bg':      ['bg', 'Normal'],
  99.   \ 'hl':      ['fg', 'Comment'],
  100.   \ 'fg+':     ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
  101.   \ 'bg+':     ['bg', 'CursorLine', 'CursorColumn'],
  102.   \ 'hl+':     ['fg', 'Statement'],
  103.   \ 'info':    ['fg', 'PreProc'],
  104.   \ 'border':  ['fg', 'Ignore'],
  105.   \ 'prompt':  ['fg', 'Conditional'],
  106.   \ 'pointer': ['fg', 'Exception'],
  107.   \ 'marker':  ['fg', 'Keyword'],
  108.   \ 'spinner': ['fg', 'Label'],
  109.   \ 'header':  ['fg', 'Comment'] }
  110.  
  111. " delimitMate
  112. let g:delimitMate_expand_cr = 1
  113. let g:delimitMate_expand_space = 1
  114.  
  115. " bind file search
  116. nnoremap <c-p> :FZF ~<CR>
  117. nnoremap <leader>a :Ag<CR>
  118.  
  119. " automatically close scratch buffer
  120. let g:ycm_autoclose_preview_window_after_insertion = 1
  121. let g:ycm_autoclose_preview_window_after_completion = 1
  122.  
  123. " fonts & colors
  124. set termguicolors
  125. set background=dark
  126. colo challenger_deep
  127. syntax on
  128. set guifont=Ubuntu\ Mono\ 13
  129.  
  130. " Fsharp
  131. let g:fsharp_only_check_errors_on_write = 1
  132. let g:fsharp_completion_helptext = 1
  133. let g:fsharp_helptext_comments = 1
  134.  
  135. " C++
  136. let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py'
  137.  
  138. " Ruby
  139. augroup Ruby
  140.     autocmd!
  141.     autocmd FileType ruby setlocal shiftwidth=2 tabstop=2
  142. augroup END
  143.  
  144. " Haskell
  145. let g:haskellmode_completion_ghc = 0
  146. augroup Haskell
  147.     autocmd!
  148.     autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
  149.     autocmd BufWritePost *.hs silent! !brittany --write-mode inplace <afile>
  150. augroup END
  151. " custom haskell keybindings
  152. au Filetype haskell nnoremap <Leader>t :GhcModTypeInsert<CR>
  153. au Filetype haskell nnoremap <Leader>s :GhcModSplitFunCase<CR>
  154. au FileType haskell nnoremap <buffer> <F1> :HdevtoolsType<CR>
  155. au FileType haskell nnoremap <buffer> <silent> <F2> :HdevtoolsClear<CR>
  156. au FileType haskell nnoremap <buffer> <silent> <F3> :HdevtoolsInfo<CR>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement