Skip to content

Instantly share code, notes, and snippets.

@abawchen
Created January 24, 2018 04:35
Show Gist options
  • Save abawchen/f2472333f5cc7954b5d3bb4fa5047ea7 to your computer and use it in GitHub Desktop.
Save abawchen/f2472333f5cc7954b5d3bb4fa5047ea7 to your computer and use it in GitHub Desktop.
My favorite .vimrc
"========================
" Basic configuration
"========================
set nocompatible
set number
set guioptions-=r
set guioptions-=L
set guioptions-=b
set showtabline=0
syntax on
set nowrap
set fileformat=unix
set cindent
set tabstop=4
set shiftwidth=4
set showmatch
set scrolloff=5
set laststatus=2
set fenc=utf-8
set backspace=2
set mouse=a
set selection=exclusive
set selectmode=mouse,key
set matchtime=5
set incsearch
set hlsearch
set expandtab
set whichwrap+=<,>,h,l
set autoread
set cursorline
"========================
" Vundle with Plugins
"========================
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/nerdtree'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'vim-airline/vim-airline'
Plugin 'Yggdroot/indentLine'
Plugin 'tpope/vim-fugitive'
Plugin 'airblade/vim-gitgutter'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'dracula/vim'
Plugin 'ntpeters/vim-better-whitespace'
"Plugin 'elzr/vim-json'
Plugin 'jiangmiao/auto-pairs'
call vundle#end()
filetype plugin indent on
"========================
" NERDTree
"========================
map <F10> :NERDTreeToggle<CR>
let NERDTreeChDirMode=1
let NERDTreeShowBookmarks=1
let NERDTreeIgnore=['\~$', '\.pyc$', '\.swp$']
let NERDTreeWinSize=25
"=======================
" CtrlP
" ======================
let g:ctrlp_max_files=0
let g:ctrlp_max_depth=40
"https://stackoverflow.com/a/22784889/9041712
let g:ctrlp_cache_dir = $HOME . '/.cache/ctrlp'
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\'
if executable('ag')
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
endif
"========================
" Other Hot-key
"========================
map <C-c> "+y
" Set colorscheme https://draculatheme.com/
colorscheme dracula
"========================
" vim-json
"========================
"let g:vim_json_syntax_conceal = 0
"let g:indentLine_concealcursor=""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment