Skip to content

Instantly share code, notes, and snippets.

@abbood
Last active October 19, 2017 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abbood/d66bdf176abdd5a50625c188d876b6e3 to your computer and use it in GitHub Desktop.
Save abbood/d66bdf176abdd5a50625c188d876b6e3 to your computer and use it in GitHub Desktop.
.vimrc
syntax enable
colorscheme zenburn
set hlsearch
set ignorecase
hi Search cterm=NONE ctermfg=grey ctermbg=yellow
set nocompatible " be iMproved, required
set number
filetype off " required
" Nerdtree
map <C-n> :NERDTreeToggle<CR>
" 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'
" 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
set grepprg=ag\ --nogroup\ --nocolor\ --ignore\ tags
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g --ignore tags""'
" 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>
nmap <F8> :TagbarToggle<CR>
set tabstop=4
set softtabstop=0 noexpandtab
set shiftwidth=4
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
set autoindent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment