Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "vimrc by Ben Sun. This is what I use, but feel free to modify
- "
- set runtimepath+=~/.vim_runtime "Where vim looks for plugins
- set nocp "Disables backward compatability with vi
- set nowrap "Disables text wrapping
- syntax enable "Enables syntax highlighting
- "Plugins
- se rtp+=~/.vim/bundle/Vundle.vim
- call vundle#begin()
- Plugin 'scrooloose/nerdtree' "Vim file explorer
- Plugin 'VundleVim/Vundle.vim' "Plugin manager
- Plugin '907th/vim-auto-save' "Automatically saves file when ESC
- Plugin 'octol/vim-cpp-enhanced-highlight' "Syntax highlighting
- Plugin 'jiangmiao/auto-pairs' "Automatically pairs parentheses
- Plugin 'NLKNguyen/papercolor-theme' "My preferred vim theme
- Plugin 'danro/rename.vim' "Allows you to rename files
- Plugin 'thaerkh/vim-indentguides' "Adds indent lines to each level
- Plugin 'CursorLineCurrentWindow' "Puts cursor only on current window
- Plugin 'luochen1990/rainbow' "Rainbow parentheses
- Plugin 'ervandew/supertab' "Improved tabline
- Plugin 'vim-airline/vim-airline' "More improved tabline
- Plugin 'vim-airline/vim-airline-themes'
- Plugin 'tc50cal/vim-terminal' "Allows you to spawn a terminal
- Plugin 'vhda/verilog_systemverilog.vim' "SV syntax highlighting
- call vundle#end()
- execute pathogen#infect()
- let g:go_version_warning = 0
- let g:auto_save = 1 "Enables auto save. If annoying, change to 0
- set mouse=a "Allows you to mouse around in the editor
- set backspace=indent,eol,start
- set statusline+=%#warningmsg#
- set statusline+=%{SyntasticStatuslineFlag()}
- set statusline+=%*
- "Linter, disable if causing issues
- let g:syntastic_always_populate_loc_list = 1
- let g:syntastic_auto_loc_list = 1
- let g:syntastic_check_on_open =1
- let g:syntastic_check_on_wq = 0
- "Move around buffers using ctrl+O and ctrl+I
- set hidden
- nnoremap <C-O> :bnext<CR>
- nnoremap <C-I> :bprev<CR>
- "Tabline configuration
- let g:airline#extensions#tabline#enabled = 1
- let g:airline#extensions#tabline#show_tabs = 1
- let g:airline_extensions#tabline#show_buffers = 1
- let g:airline_theme='angr'
- "File explorer. Hit CTRL+N to toggle
- autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
- map <C-n> :NERDTreeToggle<CR>
- set t_Co=256 "256 terminal colors
- "Theming
- set background=dark
- colorscheme PaperColor
- set number
- "Indentation level indicators
- let g:indentguides_spacechar = '|'
- let g:indentguides_tabchar = '|'
- let g:indentguides_firstlevel = get(g:, 'indentguides_firstlevel', 1)
- set cursorline "Highlights cursor line
- "More C/C++ syntax highlighting stuff
- let g:cpp_class_scope_highlight = 1
- let g:cpp_member_variable_highlight = 1
- let g:cpp_class_decl_highlight = 1
- filetype plugin on
- filetype indent on
- set autoread
- set foldmethod=syntax
- set foldnestmax=10
- set foldlevel=99
- set foldcolumn=2
- nmap <leader>w :w!<cr>
- let g:rainbow_active = 1
- set ai "Auto indent
- set si "Smart indent
- highlight Folded ctermfg=white guifg=white
- highlight Folded guibg=gray ctermbg=blue
- highlight FoldColumn ctermfg=white
- set nocompatible "Kill vi-compatibility
- set t_Co=256 "256 color
- set encoding=utf-8 "UTF-8 character encoding
- "Indent 2 spaces
- set tabstop=2 "2 space tabs
- set shiftwidth=2 "2 space shift
- set softtabstop=2 "Tab spaces in no hard tab mode
- set expandtab "Turns tabs into spaces
- set autoindent "autoindent on new lines
- set showmatch "Highlight matching braces
- set ruler "Show bottom ruler
- set equalalways "Split windows equal size
- set formatoptions=croq "Enable comment line auto formatting
- set title "Set window title to file
- set hlsearch "Highlight on search
- set ignorecase "Search ignoring case
- set smartcase "Search using smartcase
- set incsearch "Start searching immediately
- set scrolloff=5 "Never scroll off
- set wildmode=longest,list "Better unix-like tab completion
- set clipboard=unnamed "Copy and paste from system clipboard
- set lazyredraw "Don't redraw while running macros (faster)
- set wrap "Visually wrap lines
- set linebreak "Only wrap on 'good' characters for wrapping
- set backspace=indent,eol,start "Better backspacing
- set linebreak "Intelligently wrap long files
- set ttyfast "Speed up vim
- set nostartofline "Vertical movement preserves horizontal position
- "Strip whitespace from end of lines when writing file
- autocmd BufWritePre * :%s/\s\+$//e
Advertisement
Add Comment
Please, Sign In to add comment