Skip to content

Instantly share code, notes, and snippets.

@abbood
Created November 10, 2017 07:51
Show Gist options
  • Save abbood/dc5536cf74814158991f096f3ec1db73 to your computer and use it in GitHub Desktop.
Save abbood/dc5536cf74814158991f096f3ec1db73 to your computer and use it in GitHub Desktop.
abbood vimrc
syntax enable
colorscheme zenburn
set hlsearch
set ignorecase
hi Search cterm=NONE ctermfg=black ctermbg=172
set nocompatible " be iMproved, required
set number
filetype off " required
" VUNDLE
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" Plugin 'ascenator/L9', {'name': 'newL9'}
Plugin 'burnettk/vim-angular'
Plugin 'scrooloose/nerdtree'
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'
Plugin 'vim-scripts/AutoComplPop'
Plugin 'vim-scripts/cSyntaxAfter'
Plugin 'w0ng/vim-hybrid'
Plugin 'majutsushi/tagbar'
Plugin 'tmhedberg/matchit'
Plugin 'jdkanani/vim-material-theme'
Plugin 'kristijanhusak/vim-hybrid-material'
Plugin 'tpope/vim-fugitive'
Plugin 'Raimondi/delimitMate'
Plugin 'severin-lemaignan/vim-minimap'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
set tags=./tags,tags;$HOME
set runtimepath^=~/.vim/bundle/ctrlp.vim
set grepprg=grep\ -nriI\ --exclude=tags\ --exclude-dir=vendor
" The Silver Searcher
if executable('ag')
" Use ag over grep
let &grepprg = "ag --nogroup --nocolor --ignore wiki --ignore tags --ignore database --ignore tests"
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
endif
" bind K to grep word under cursor
nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR>
" bind \ (backward slash) to grep shortcut
command -nargs=+ -complete=file -bar Ag silent! grep! <args>|cwindow|redraw!
nnoremap \ :Ag<SPACE>
" bind K to grep word under cursor
nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR>
" https://stackoverflow.com/a/42218001/766570
nmap <F8> :TagbarToggle<CR>
nmap <F12> :CtrlP<CR>
" Nerdtree
map <C-n> :NERDTreeToggle<CR>
noremap <F9> :vertical botright copen 60<cr>
noremap <F10> :copen 40<cr>
set tabstop=4
set softtabstop=0 noexpandtab
set shiftwidth=4
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
set autoindent
set clipboard=unnamed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment