Advertisement
Guest User

Untitled

a guest
May 25th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 3.98 KB | None | 0 0
  1. set shell=/bin/bash
  2.  
  3. "call pathogen#infect()
  4.  
  5. set nocompatible               " be iMproved
  6. filetype off                   " required!
  7. set rtp+=~/.vim/bundle/Vundle.vim
  8. call vundle#begin()
  9. " Bundles
  10. Bundle 'chriskempson/tomorrow-theme', {'rtp': 'vim/'}
  11. Bundle 'tomtom/tlib_vim'
  12. Bundle 'marcweber/vim-addon-mw-utils'
  13. "Bundle 'garbas/vim-snipmate'
  14. "Bundle 'othree/vim-autocomplpop'
  15. Bundle 'Shougo/neocomplcache.vim'
  16. Bundle 'scrooloose/nerdtree'
  17. Bundle 'airblade/vim-gitgutter'
  18. "Bundle 'ervandew/supertab'
  19. Bundle 'guns/xterm-color-table.vim'
  20. Bundle 'Twinside/vim-cuteErrorMarker'
  21. Bundle 'ntpeters/vim-better-whitespace'
  22. Bundle 'Yggdroot/indentLine'
  23. Bundle 'eparreno/vim-l9'
  24. Bundle 'elzr/vim-json'
  25. Bundle 'majutsushi/tagbar'
  26. Bundle 'neovimhaskell/haskell-vim'
  27. "Bundle 'nathanaelkane/vim-indent-guides'
  28. call vundle#end()
  29. filetype plugin indent on
  30.  
  31. "Basic Configs
  32. set mouse=a
  33. set shiftwidth=4
  34. set expandtab
  35. set softtabstop=4
  36. set laststatus=2
  37. set noshowmode
  38. set number
  39. set modeline
  40. "set t_Co=256
  41. set foldmethod=syntax
  42. set nofoldenable
  43. set tabstop=4
  44. set cursorline
  45. set rtp+=/usr/lib/python3.6/site-packages/powerline/bindings/vim
  46.  
  47. nnoremap <silent> <F5> :NERDTree<CR>
  48. nnoremap <F6> :TagbarToggle<CR>
  49.  
  50. let g:tagbar_ctags_bin='ctags'
  51. let g:tagbar_width=30
  52.  
  53. syntax on
  54.  
  55. nnoremap <F4> :w <bar> :!~/.cp-script f4 % <CR>
  56. nnoremap <F7> :w <bar> :!~/.cp-script addin %< <CR>
  57. autocmd filetype cpp nnoremap <F8> :w <bar> :!~/.cp-script cppf8 %< <CR>
  58. autocmd filetype cpp nnoremap <F9> :w <bar> :!~/.cp-script cppf9 %< <CR>
  59. autocmd filetype python nnoremap <F8> :w <bar> :!~/.cp-script pyf8 %< <CR>
  60. autocmd filetype python nnoremap <F9> :w <bar> :!~/.cp-script pyf9 %< <CR>
  61. autocmd filetype haskell nnoremap <F8> :w <bar> :!ghci -XTemplateHaskell -XTemplateHaskellQuotes % <CR>
  62. autocmd filetype haskell nnoremap <F9> :w <bar> :!~/.cp-script hsf9 %< <CR>
  63. nnoremap <F10> :w <bar> :!cat % \| xclip -selection clipboard <CR>
  64.  
  65. "Specific Configs
  66.  
  67. "theme
  68. color Tomorrow-Night-Bright
  69. colorscheme Tomorrow-Night-Bright
  70.  
  71. "neocomplcache
  72. let g:neocomplcache_enable_at_startup = 1
  73. "let g:neocomplcache_disableautocomplete = 1
  74. let g:neocomplcache_enable_smart_case = 1
  75. " Recommended key-mappings.
  76. " <CR>: close popup and save indent.
  77. inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
  78. function! s:my_cr_function()
  79.   return neocomplcache#smart_close_popup() . "\<CR>"
  80.   " For no inserting <CR> key.
  81.   "return pumvisible() ? neocomplcache#close_popup() : "\<CR>"
  82. endfunction
  83. " <TAB>: completion.
  84. inoremap <expr><TAB>  pumvisible() ? "\<C-n>" : "\<TAB>"
  85. let g:neocomplcache_enable_insert_char_pre = 1
  86.  
  87. "betterwhitspace
  88. hi ExtraWhitespace ctermbg = darkgray
  89.  
  90. hi Normal ctermbg=NONE
  91. hi CursorLine ctermbg=NONE
  92.  
  93. hi LineNr ctermfg=gray
  94.  
  95. " haskell-vim config start
  96. let g:haskell_enable_quantification = 1   " to enable highlighting of `forall`
  97. let g:haskell_enable_recursivedo = 1      " to enable highlighting of `mdo` and `rec`
  98. let g:haskell_enable_arrowsyntax = 1      " to enable highlighting of `proc`
  99. let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern`
  100. let g:haskell_enable_typeroles = 1        " to enable highlighting of type roles
  101. let g:haskell_enable_static_pointers = 1  " to enable highlighting of `static`
  102. let g:haskell_backpack = 1                " to enable highlighting of backpack keywords
  103. let g:haskell_indent_if = 4
  104. let g:haskell_indent_case = 4
  105. let g:haskell_indent_let = 4
  106. let g:haskell_indent_where = 6
  107. let g:haskell_indent_before_where = 2
  108. let g:haskell_indent_after_bare_where = 2
  109. let g:haskell_indent_do = 4
  110. let g:haskell_indent_in = 0
  111. let g:haskell_indent_guard = 4
  112. " haskell-vim config end
  113.  
  114. "indent-guide
  115. "let g:indent_guides_enable_on_vim_startup = 1
  116. "let g:indent_guides_start_level = 3
  117. "let g:indent_guides_guide_size = 1
  118. "let g:indent_guides_auto_colors = 0
  119. "hi IndentGuidesOdd ctermbg = 235
  120. "hi IndentGuidesEven ctermbg = 233
  121. function! Sudowrite()
  122.     w !sudo tee % > /dev/null
  123.     edit!
  124. endfunction
  125. command W call Sudowrite()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement