Guest User

myvimrcstuff

a guest
May 22nd, 2024
1,582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 4.50 KB | Source Code | 0 0
  1. set encoding=utf-8
  2. set fileencoding=utf-8
  3. set termencoding=utf-8
  4.  
  5.  
  6. set rtp+=~/.vim/bundle/Vundle.vim
  7. call vundle#begin()
  8.  
  9. "==============PLUGINS=================
  10. " let Vundle manage Vundle, required
  11. Plugin 'VundleVim/Vundle.vim'
  12. Plugin 'ycm-core/YouCompleteMe'
  13. Plugin 'vim-airline/vim-airline'
  14. Plugin 'vim-airline/vim-airline-themes'
  15. Plugin 'morhetz/gruvbox'
  16. Plugin 'powerline/fonts'
  17. "Plugin 'bfrg/vim-cpp-modern'
  18.  
  19. "Use for larger files
  20. Plugin 'preservim/nerdtree'
  21.  
  22. " All of your Plugins must be added before the following line
  23. call vundle#end()            " required
  24. filetype plugin indent on    " required
  25. "=====================================
  26.  
  27.  
  28. "================COLOR================
  29. syntax on
  30. colorscheme gruvbox
  31. set bg=dark
  32. "let g:cpp_member_highlight = 1
  33. "let g:cpp_simple_highlight = 1
  34. "=====================================
  35.  
  36.  
  37. "ENABLE NERD TREESSS
  38. "autocmd VimEnter * NERDTree
  39.  
  40. "=================MISC================
  41.  
  42. "Num lines
  43. set number
  44. set number relativenumber
  45.  
  46. "High lights the search
  47. set hlsearch
  48.  
  49. "Lets line continue forever
  50. set nowrap
  51.  
  52. " Search cases ignore upper case
  53. set ignorecase
  54.  
  55. " Tabs / Indentation
  56. set autoindent
  57.  
  58. set expandtab
  59.  
  60. set tabstop=4
  61.  
  62. set softtabstop=4
  63.  
  64. " Deletes all trailing white space
  65. autocmd BufWritePre * %s/\s\+$//e
  66.  
  67. " No noise
  68. set novisualbell
  69.  
  70. " Mouse !
  71. set mouse=a
  72.  
  73. " (x, y) bottom right
  74. set ruler
  75.  
  76. " shows cmds you are typing
  77. set showcmd
  78.  
  79. " makes it so that your 'yanked' (pasted) text can be copied to the rest of the computer
  80. set clipboard^=unnamed,unnamedplus
  81.  
  82. " Opens a terminal that will be to the right of the screen, terminal size should be smaller 1!!!
  83. command Vt :rightb :vert :terminal ++cols=80
  84.  
  85. set cursorline
  86. set noshowmode
  87.  
  88. " press zz to compile and run a c program in normal mode, returns to the previous state once compiled
  89. autocmd filetype c nnoremap zz :w <CR>:!gcc % -o %:r && ./%:r<CR>
  90. "=====================================
  91.  
  92.  
  93. "===============YCM&FONT==============
  94.  
  95. " YCM stuff
  96. augroup MyYCMCustom
  97.   autocmd!
  98.   autocmd FileType c,cpp let b:ycm_hover = {
  99.     \ 'command': 'GetDoc',
  100.     \ 'syntax': &filetype
  101.     \ }
  102. augroup END
  103.  
  104. " Shows the hover bar immediatley
  105. nmap JJ <plug>(YCMHover)
  106.  
  107. "Sets the default powerline font
  108. set guifont=DejaVuSansMonoPowerline:h11
  109. "=====================================
  110.  
  111.  
  112. "=====================================
  113.  
  114. " air-line
  115. let g:airline_powerline_fonts = 1
  116.  
  117. if !exists('g:airline_symbols')
  118.     let g:airline_symbols = {}
  119. endif
  120.  
  121. " unicode symbols
  122. let g:airline_left_sep = '»'
  123. let g:airline_left_sep = '▶'
  124. let g:airline_right_sep = '«'
  125. let g:airline_right_sep = '◀'
  126. let g:airline_symbols.linenr = '␊'
  127. let g:airline_symbols.linenr = '␤'
  128. let g:airline_symbols.linenr = '¶'
  129. let g:airline_symbols.branch = '⎇'
  130. let g:airline_symbols.paste = 'ρ'
  131. let g:airline_symbols.paste = 'Þ'
  132. let g:airline_symbols.paste = '∥'
  133. let g:airline_symbols.whitespace = 'Ξ'
  134.  
  135. " airline symbols import a powerline font if these show up as blank boxes
  136. let g:airline_left_sep = ''
  137. let g:airline_left_alt_sep = ''
  138. let g:airline_right_sep = ''
  139. let g:airline_right_alt_sep = ''
  140. let g:airline_symbols.branch = ''
  141. let g:airline_symbols.readonly = ''
  142. let g:airline_symbols.linenr = ''
  143.  
  144. let g:airline_theme='gruvbox'
  145.  
  146. "Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
  147. "If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
  148. "(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
  149. if (empty($TMUX) && getenv('TERM_PROGRAM') != 'Apple_Terminal')
  150.   if (has("nvim"))
  151.     "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
  152.     let $NVIM_TUI_ENABLE_TRUE_COLOR=1
  153.   endif
  154.   "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
  155.   "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
  156.   " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
  157.   if (has("termguicolors"))
  158.     set termguicolor
  159.   endif
  160. endif
  161. "=====================================
  162.  
  163. "=============iMprovedSyntax==========
  164. let g:ycm_enable_semantic_highlighting=1
  165. call prop_type_add( 'YCM_HL_parameter', { 'highlight': 'Normal' } )
  166. call prop_type_add( 'YCM_HL_variable', { 'highlight': 'Normal' } )
  167. call prop_type_add( 'YCM_HL_function', { 'highlight': 'Special'} )
  168.  
  169. "=====================================
  170.  
Tags: vim
Advertisement
Add Comment
Please, Sign In to add comment