-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
90 lines (67 loc) · 1.61 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
" Resources for Vim:
" vimtutor
" vim-adventures.com
" vimgolf gem
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'preservim/nerdtree'
Plugin 'preservim/nerdcommenter'
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'
Plugin 'https://github.com/rking/ag.vim'
Plugin 'ntpeters/vim-better-whitespace'
Plugin 'Valloric/YouCompleteMe'
Plugin 'morhetz/gruvbox'
call vundle#end()
syntax enable
filetype plugin indent on
set colorcolumn=120
highlight ExtraWhitespace ctermbg=red
colorscheme gruvbox
set modelines=0
set number
set cursorline
set visualbell
set encoding=utf-8
set wrap
set textwidth=120
set formatoptions=tcqrn1
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set noshiftround
set scrolloff=3
set backspace=indent,eol,start
set hidden
set ttyfast
set laststatus=2
set showmode
set showcmd
set hlsearch
set incsearch
" set ignorecase
" set smartcase
" Display extra whitespace
set list listchars=tab:»·,trail:·,nbsp:·
" Set leader
let mapleader = " "
" :bn and :bp to toggle to next or previous buffer
let NERDSpaceDelims=1
let g:NERDTreeWinSize=60
map <leader>j 15j<CR>
map <leader>k 15k<CR>
map <leader>b :bn<CR>
map <leader>v :bp<CR>
map <leader>o :NERDTreeToggle<CR>
map <leader>n :NERDTreeFind<CR>
map <leader>y :NERDTreeFocus<CR>
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree ~/upstart_web | endif
let g:fzf_layout = { 'down': '20%' }
nnoremap <leader>fs :Files<CR>
nnoremap <silent> <leader>gd :YcmCompleter GoTo<CR>
nnoremap <silent> <leader>gf :YcmCompleter FixIt<CR>
noremap! <C-?> <C-h>