Skip to content

Instantly share code, notes, and snippets.

@ruevaughn
Last active June 6, 2021 11:16
Show Gist options
  • Save ruevaughn/ac7626f214f3c3910d2db030d6449ac8 to your computer and use it in GitHub Desktop.
Save ruevaughn/ac7626f214f3c3910d2db030d6449ac8 to your computer and use it in GitHub Desktop.
wget -O ~/.vimrc https://gist.githubusercontent.com/ruevaughn/ac7626f214f3c3910d2db030d6449ac8/raw/.vimrc my basic .vimrc for spinning up new linux distro, CTFs, PWNboxes, Etc
" https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation
syntax on
set noerrorbells
set tabstop=2 softtabstop=2
set shiftwidth=2
set expandtab
set smartindent
set nu
set nowrap
set smartcase
set noswapfile
set nobackup
set undodir=~/.vim/undodir
set undofile
set incsearch
set colorcolumn=80
highlight ColorColumn ctermbg=0 guibg=lightgrey
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'morhetz/gruvbox'
Plug 'jremmen/vim-ripgrep'
Plug 'tpope/vim-fugitive'
Plug 'vim-utils/vim-man'
Plug 'lyuts/vim-rtags'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'ycm-core/YouCompleteMe'
Plug 'mbbill/undotree'
call plug#end()
colorscheme gruvbox
set background=dark
if executable('rg')
let g:rg_derive_roto='true'
endif
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude']
let mapleader = " "
let g:netrw_browse_split=2
let g:netrw_banner=0
let g:netrw_winsize = 25
let g:ctrlp_use_caching = 0
nnoremap <leader>h :wincmd h<CR>
nnoremap <leader>j :wincmd j<CR>
nnoremap <leader>k :wincmd k<CR>
nnoremap <leader>l :wincmd l<CR>
nnoremap <leader>u :Undotreeshow
nnoremap <leader>pv :wincmd V<bar> :Ex <bar> :vertical resize 30<CR>
nnoremap <Leader>ps :Rg<SPACE>
nnoremap <Silent><Leader>+ :vertical resize +5<CR>
nnoremap <Silent><Leader>- :vertical resize -5<CR>
" YCM
" The Best Part
nnoremap <Silent><Leader>gd :YcmCompleter GoTo<CR>
nnoremap <Silent><Leader>gf :YcmCompleter Fixit<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment