-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_vimrc
243 lines (195 loc) · 6.71 KB
/
dot_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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
:set nocp " not in compatible mode
" Vim-Plug {{{
" ----------------------------------------------------------------------------
" Plug
" ----------------------------------------------------------------------------
" Load vim-plug
if empty(glob("~/.vim/autoload/plug.vim"))
execute '!curl -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim'
endif
call plug#begin('~/.vim/plugged')
" Colorschemes
"Plug 'captbaritone/molokai'
"Plug 'chriskempson/vim-tomorrow-theme'
Plug 'altercation/vim-colors-solarized'
"Plug 'fxn/vim-monochrome'
"Plug 'chriskempson/base16-vim'
"Plug 'NLKNguyen/papercolor-theme'
" Syntax
"Plug 'tpope/vim-git', { 'for': 'git' }
"Plug 'cakebaker/scss-syntax.vim', { 'for': 'scss' }
"Plug 'xsbeats/vim-blade', { 'for': 'blade' }
"Plug 'qrps/lilypond-vim', { 'for': 'lilypond' }
"Plug 'plasticboy/vim-markdown', { 'for': 'markdown' }
" Vim motions on speed!
"Plug 'easymotion/vim-easymotion'
" Manipulating and moving between function arguments.
"Plug 'PeterRincker/vim-argumentative'
" Provides insert mode auto-completion for quotes, parens, brackets, etc.
"Plug 'Raimondi/delimitMate'
" Edit every file in a quickfix list at the same time
"Plug 'Olical/vim-enmasse'
" A Vim alignment plugin
"Plug 'junegunn/vim-easy-align'
" A vim plugin for Ack
" Plug 'mileszs/ack.vim'
" Show a diff via Vim sign column.
"Plug 'mhinz/vim-signify'
" Vim plugin for the_silver_searcher, 'ag',
"Plug 'rking/ag.vim'
" Search local vimrc files (".lvimrc") in the tree (root dir up to current dir) and load them.
"Plug 'embear/vim-localvimrc'
" Asynchronous build and test dispatcher
"Plug 'tpope/vim-dispatch'
" The ultimate snippet solution for Vim. Send pull requests to SirVer/ultisnips!
"Plug 'SirVer/ultisnips'
" Expand characters to code if not in a comment or string
"Plug 'Olical/vim-syntax-expand'
" Completion
"Plug 'mattn/emmet-vim', { 'for': 'html' }
" Make % match xml tags
"Plug 'edsono/vim-matchit', { 'for': ['html', 'xml'] }
" Make tab handle all completions
"Plug 'ervandew/supertab'
" Syntastic: Code linting errors
"Plug 'scrooloose/syntastic', { 'for': ['python', 'javascript', 'css'] }
" Pairs of handy bracket mappings
"Plug 'tpope/vim-unimpaired'
" Fancy statusline
Plug 'bling/vim-airline'
" Fuzzy file opener
Plug 'kien/ctrlp.vim'
" CtrlP extension to navigate and jump to function defs
"Plug 'tacahiroy/ctrlp-funky'
" Filetype detection and syntax highlightnig for JSON
Plug 'elzr/vim-json'
" Yaml linting
Plug 'stephpy/vim-yaml'
" Auto-pairing brackets, braces etc
Plug 'jiangmiao/auto-pairs'
"Plug 'rking/ag.vim'
" CamelCase motions through words
"Plug 'bkad/CamelCaseMotion'
" Split and join lines of code intelligently
"Plug 'AndrewRadev/splitjoin.vim'
"Plug 'gcmt/taboo.vim'
" Split navigation that works with tmux
"Plug 'christoomey/vim-tmux-navigator'
" Take notes and keep todo lists in vim
"Plug 'vimwiki/vimwiki'
" Vastly improved Javascript indentation and syntax support in Vim
"Plug 'pangloss/vim-javascript'
" Visualize undo tree
"Plug 'mbbill/undotree'
" Nerdtree
Plug 'scrooloose/nerdtree'
" A plugin of NERDTree showing git status flags.
Plug 'Xuyuanp/nerdtree-git-plugin'
" You Complete Me
"Plug 'Valloric/YouCompleteMe', { 'do': './install.sh' }
"Plug 'parkr/vim-jekyll'
" Gundo
"Plug 'sjl/gundo.vim'
" Vim plugin for the Perl module / CLI script 'ack'
"Plug 'mileszs/ack.vim'
" Tern for vim
"Plug 'marijnh/tern_for_vim'
" A Vim plugin which shows a git diff in the gutter (sign column) and stages/reverts hunks.
Plug 'airblade/vim-gitgutter'
" Plugins from tpope
"Plug 'tpope/vim-abolish'
"Plug 'tpope/vim-commentary'
"Plug 'tpope/vim-dispatch'
"Plug 'tpope/vim-endwise'
"Plug 'tpope/vim-eunuch'
"Plug 'tpope/vim-fireplace'
Plug 'tpope/vim-fugitive'
"Plug 'tpope/vim-leiningen'
"Plug 'tpope/vim-markdown', { 'for': 'markdown' }
"Plug 'tpope/vim-projectionist'
"Plug 'tpope/vim-ragtag'
"Plug 'tpope/vim-repeat'
Plug 'tpope/vim-sensible'
"Plug 'tpope/vim-sexp-mappings-for-regular-people'
"Plug 'tpope/vim-sleuth'
Plug 'tpope/vim-surround'
"Plug 'tpope/vim-unimpaired'
"Plug 'tpope/vim-vinegar'
Plug 'andrewstuart/aws-vim'
Plug 'hashivim/vim-vagrant'
" Other plugins require curl
if executable("curl")
" Webapi: Dependency of Gist-vim
Plug 'mattn/webapi-vim'
" Gist: Post text to gist.github
Plug 'mattn/gist-vim'
endif
filetype plugin indent on " required!
call plug#end()
"}}}
" Colors {{{
" set background=dark
" colorscheme solarized " colorscheme
" let g:solarized_termcolors=256
" let g:solarized_termtrans=1
set hlsearch " highlight search matches
"}}}
" Spaces & Tabs {{{
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set shiftwidth=4 " amount of whitespaces to insert or remove using the indentation commands
set expandtab " tabs are spaces
"}}}
" UI Layout {{{
set number " show line number
set cursorline " highlight current line
filetype indent on " load filetype-specific indent files
set lazyredraw " redraw only when we need to
set showmatch " highlight matching [{()}]
"}}}
" Searching {{{
set incsearch " search as characters are entered
set hlsearch " highlight matches
" turn off search highlight
nnoremap <leader><space> :nohlsearch<CR> " Turn off search highlights with space
"}}}
" Folding {{{
set foldenable " enable folding
set foldlevelstart=10 " open most folds by default
set foldnestmax=10 " 10 nested fold ma
nnoremap <space> za " space open/closes folds
set foldmethod=marker " fold based on marker level
"}}}
" Custom movement {{{
" Disable arrow keys
inoremap <Up> <NOP>
inoremap <Down> <NOP>
inoremap <Left> <NOP>
inoremap <Right> <NOP>
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
nnoremap gV `[v`] " highlight last inserted text
"}}}
"{{{ Leader shortcuts
noremap <leader>u :GundoToggle<CR> " toggle gundo
"}}}
"{{{ CtrlP
let g:ctrlp_match_window = 'bottom,order:ttb'
let g:ctrlp_switch_buffer = 0
let g:ctrlp_working_path_mode = 0
let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""'
"}}}
"{{{ NERDTree
map <C-n> :NERDTreeToggle<CR> " toggle nerdtree
"}}}
"{{{ Backups
set backup
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set backupskip=/tmp/*,/private/tmp/*
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set writebackup
"}}}
set modelines=1
" vim:foldmethod=marker:foldlevel=0