Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set encoding=utf-8
- set fileencoding=utf-8
- set termencoding=utf-8
- set rtp+=~/.vim/bundle/Vundle.vim
- call vundle#begin()
- "==============PLUGINS=================
- " let Vundle manage Vundle, required
- Plugin 'VundleVim/Vundle.vim'
- Plugin 'ycm-core/YouCompleteMe'
- Plugin 'vim-airline/vim-airline'
- Plugin 'vim-airline/vim-airline-themes'
- Plugin 'morhetz/gruvbox'
- Plugin 'powerline/fonts'
- "Plugin 'bfrg/vim-cpp-modern'
- "Use for larger files
- Plugin 'preservim/nerdtree'
- " All of your Plugins must be added before the following line
- call vundle#end() " required
- filetype plugin indent on " required
- "=====================================
- "================COLOR================
- syntax on
- colorscheme gruvbox
- set bg=dark
- "let g:cpp_member_highlight = 1
- "let g:cpp_simple_highlight = 1
- "=====================================
- "ENABLE NERD TREESSS
- "autocmd VimEnter * NERDTree
- "=================MISC================
- "Num lines
- set number
- set number relativenumber
- "High lights the search
- set hlsearch
- "Lets line continue forever
- set nowrap
- " Search cases ignore upper case
- set ignorecase
- " Tabs / Indentation
- set autoindent
- set expandtab
- set tabstop=4
- set softtabstop=4
- " Deletes all trailing white space
- autocmd BufWritePre * %s/\s\+$//e
- " No noise
- set novisualbell
- " Mouse !
- set mouse=a
- " (x, y) bottom right
- set ruler
- " shows cmds you are typing
- set showcmd
- " makes it so that your 'yanked' (pasted) text can be copied to the rest of the computer
- set clipboard^=unnamed,unnamedplus
- " Opens a terminal that will be to the right of the screen, terminal size should be smaller 1!!!
- command Vt :rightb :vert :terminal ++cols=80
- set cursorline
- set noshowmode
- " press zz to compile and run a c program in normal mode, returns to the previous state once compiled
- autocmd filetype c nnoremap zz :w <CR>:!gcc % -o %:r && ./%:r<CR>
- "=====================================
- "===============YCM&FONT==============
- " YCM stuff
- augroup MyYCMCustom
- autocmd!
- autocmd FileType c,cpp let b:ycm_hover = {
- \ 'command': 'GetDoc',
- \ 'syntax': &filetype
- \ }
- augroup END
- " Shows the hover bar immediatley
- nmap JJ <plug>(YCMHover)
- "Sets the default powerline font
- set guifont=DejaVuSansMonoPowerline:h11
- "=====================================
- "=====================================
- " air-line
- let g:airline_powerline_fonts = 1
- if !exists('g:airline_symbols')
- let g:airline_symbols = {}
- endif
- " unicode symbols
- let g:airline_left_sep = '»'
- let g:airline_left_sep = '▶'
- let g:airline_right_sep = '«'
- let g:airline_right_sep = '◀'
- let g:airline_symbols.linenr = '␊'
- let g:airline_symbols.linenr = ''
- let g:airline_symbols.linenr = '¶'
- let g:airline_symbols.branch = '⎇'
- let g:airline_symbols.paste = 'ρ'
- let g:airline_symbols.paste = 'Þ'
- let g:airline_symbols.paste = '∥'
- let g:airline_symbols.whitespace = 'Ξ'
- " airline symbols import a powerline font if these show up as blank boxes
- let g:airline_left_sep = ''
- let g:airline_left_alt_sep = ''
- let g:airline_right_sep = ''
- let g:airline_right_alt_sep = ''
- let g:airline_symbols.branch = ''
- let g:airline_symbols.readonly = ''
- let g:airline_symbols.linenr = ''
- let g:airline_theme='gruvbox'
- "Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
- "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
- "(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
- if (empty($TMUX) && getenv('TERM_PROGRAM') != 'Apple_Terminal')
- if (has("nvim"))
- "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
- let $NVIM_TUI_ENABLE_TRUE_COLOR=1
- endif
- "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
- "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
- " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
- if (has("termguicolors"))
- set termguicolor
- endif
- endif
- "=====================================
- "=============iMprovedSyntax==========
- let g:ycm_enable_semantic_highlighting=1
- call prop_type_add( 'YCM_HL_parameter', { 'highlight': 'Normal' } )
- call prop_type_add( 'YCM_HL_variable', { 'highlight': 'Normal' } )
- call prop_type_add( 'YCM_HL_function', { 'highlight': 'Special'} )
- "=====================================
Advertisement
Add Comment
Please, Sign In to add comment