-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
129 lines (100 loc) · 2.54 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
set nocompatible " ignore vi compatabiity
syntax on
set mouse=a
" Set relative line numbers...
set relativenumber
" ...but absolute numbers on the current line
set number
"tab/indentation settings
set smartindent
set tabstop=2
set shiftwidth=2
set expandtab " tabs to spaces
set autoindent
"left at SoL, right at EoL
set whichwrap+=<,>,h,l,[,]
set termguicolors
"remove left scrollbar
set guioptions=r
" haven't had time to configure this yet
" set rtp+=/usr/local/opt/fzf
" when pasting stuff
set pastetoggle=<F3>
filetype off
filetype plugin on
filetype plugin indent on
set modelines=0
" vundle
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-fugitive'
Plugin 'airblade/vim-gitgutter'
Plugin 'morhetz/gruvbox'
Plugin 'scrooloose/nerdcommenter'
Plugin 'jiangmiao/auto-pairs'
Plugin 'tpope/vim-surround'
Plugin 'valloric/youcompleteme'
Plugin 'rking/ag.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-ctrlspace/vim-ctrlspace'
Plugin 'MattesGroeger/vim-bookmarks'
Plugin 'majutsushi/tagbar'
Plugin 'ctrlpvim/ctrlp.vim'
call vundle#end()
set background=dark
" auto startup nerdtree
" autocmd VimEnter * NERDTree
map <C-k> :NERDTreeToggle<CR>
set tags=.tags;
let mapleader = ','
nnoremap <leader>a :Ag<space>
nnoremap <leader>b :CtrlPBuffer<CR>
nnoremap <leader>t :CtrlP<CR>
nnoremap <leader>T :CtrlPClearCache<CR>:CtrlP<CR>
" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher
if executable('ag')
" Use Ag over Grep
set grepprg=ag\ --nogroup\ --nocolor
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
endif
let macvim_skip_colorscheme=1
colorscheme gruvbox
autocmd BufNewFile,BufReadPost *.ino,*.pde,*.cpp set filetype=cpp
autocmd BufNewFile,BufReadPost *.c set filetype=c
autocmd BufNewFile,BufReadPost *.py set filetype=python
autocmd Filetype markdown setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4
inoremap jk <Esc>
inoremap kj <Esc>
"search + regex options
nnoremap / /\v
vnoremap / /\v
set ignorecase
set smartcase
set gdefault
set incsearch
set showmatch
set hlsearch
"makes backspace work in a sane manner
set backspace=indent,eol,start
set showmode
set showcmd
set hidden
set wildmenu
set wildmode=list:longest
"screen flash on error
set visualbell
set cursorline
set ttyfast
"word wrap options
"set wrap
"set textwidth=80
"set formatoptions=qrn1
set colorcolumn=80
" Code folding
set foldmethod=indent
set foldlevel=99
" Fold with spacebar
nnoremap <space> za