Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 3.46 KB | None | 0 0
  1. set nocompatible              " be iMproved, required
  2. filetype off                  " required
  3.  
  4. " set the runtime path to include Vundle and initialize
  5. set rtp+=~/.vim/bundle/Vundle.vim
  6. call vundle#begin()
  7. " let Vundle manage Vundle, required
  8. Plugin 'VundleVim/Vundle.vim'
  9.  
  10. " Useful defaults
  11. Plugin 'tpope/vim-sensible'
  12.  
  13. " Git
  14. Plugin 'tpope/vim-fugitive'
  15. Plugin 'airblade/vim-gitgutter'
  16.  
  17. " Theming
  18. Plugin 'vim-airline/vim-airline'
  19. Plugin 'RRethy/vim-illuminate'
  20. Plugin 'flazz/vim-colorschemes'
  21.  
  22. " Mappings
  23. Plugin 'tpope/vim-commentary'
  24. Plugin 'tpope/vim-surround'
  25. Plugin 'AndrewRadev/sideways.vim'
  26.  
  27. " Language support
  28. Plugin 'vim-syntastic/syntastic'
  29. Plugin 'sheerun/vim-polyglot'
  30.  
  31. " Tag management
  32. Plugin 'ludovicchabant/vim-gutentags'
  33.  
  34. " Language Servers
  35. Plugin 'prabirshrestha/async.vim'
  36. Plugin 'prabirshrestha/vim-lsp'
  37.  
  38. " Plugin 'w0rp/ale'
  39.  
  40.  
  41. call vundle#end()            " required
  42. filetype plugin indent on    " required
  43.  
  44. " enable syntax and plugins (for netrw)
  45. syntax enable
  46. filetype plugin on
  47.  
  48. """"""""""""""""""""""""""""""""""""""""""""""""""
  49. " Indentation options
  50. """"""""""""""""""""""""""""""""""""""""""""""""""
  51.  
  52. " Length of a tab (actual tab character)
  53. set tabstop=8
  54.  
  55. " Use spaces instead of tabs
  56. set expandtab
  57.  
  58. " Length of an indentation level
  59. set shiftwidth=4
  60.  
  61. " Do smart autoindenting when starting a new line, works for C-like programs
  62. set smartindent
  63.  
  64. """"""""""""""""""""""""""""""""""""""""""""""""""
  65. " Interface options
  66. """"""""""""""""""""""""""""""""""""""""""""""""""
  67.  
  68. " Show line number
  69. set number
  70.  
  71. " Highlight current line
  72. set cursorline
  73.  
  74. " Mark 80th column.
  75. set colorcolumn=80
  76.  
  77. " Enhanced command line completion
  78. set wildmenu
  79.  
  80. " Disable bell completely
  81. set visualbell
  82. set t_vb=
  83.  
  84. set list
  85. set listchars=tab:›\ ,eol:¬,trail:⋅,nbsp:¤
  86.  
  87. " FINDING FILES:
  88. set path+=**
  89.  
  90. " Colorscheme
  91. " set bg=dark
  92. " colorscheme gruvbox
  93.  
  94. " Set the minimal amount of lignes under and above the cursor
  95. " Useful for keeping context when moving with j/k
  96. set scrolloff=5
  97.  
  98. """"""""""""""""""""""""""""""""""""""""""""""""""
  99. " Folding options
  100. """"""""""""""""""""""""""""""""""""""""""""""""""
  101.  
  102. " Fold lines with equal indent
  103. set foldmethod=indent
  104.  
  105. " Open all folds by default.
  106. set nofoldenable
  107.  
  108. """"""""""""""""""""""""""""""""""""""""""""""""""
  109. """"""""""""""""""""""""""""""""""""""""""""""""""
  110. " Plugin Configuration """""""""""""""""""""""""""
  111. """"""""""""""""""""""""""""""""""""""""""""""""""
  112. """"""""""""""""""""""""""""""""""""""""""""""""""
  113.  
  114. """"""""""""""""""""""""""""""""""""""""""""""""""
  115. " Plugin syntastic
  116. """"""""""""""""""""""""""""""""""""""""""""""""""
  117.  
  118. let g:syntastic_always_populate_loc_list = 1
  119.  
  120. """"""""""""""""""""""""""""""""""""""""""""""""""
  121. " Plugin vim-lsp
  122. """"""""""""""""""""""""""""""""""""""""""""""""""
  123.  
  124. if executable('clangd')
  125.     augroup lsp_clangd
  126.         autocmd!
  127.         autocmd User lsp_setup call lsp#register_server({
  128.                     \ 'name': 'clangd',
  129.                     \ 'cmd': {server_info->['clangd']},
  130.                     \ 'whitelist': ['c', 'cpp', 'objc', 'objcpp'],
  131.                     \ })
  132.         autocmd FileType c setlocal omnifunc=lsp#complete
  133.     augroup end
  134. endif
  135.  
  136. " let g:lsp_log_verbose = 1
  137. " let g:lsp_log_file = expand('~/vim-lsp.log')
  138.  
  139. """"""""""""""""""""""""""""""""""""""""""""""""""
  140. " Plugin sideways
  141. """"""""""""""""""""""""""""""""""""""""""""""""""
  142.  
  143. nnoremap <c-h> :SidewaysLeft<cr>
  144. nnoremap <c-l> :SidewaysRight<cr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement