forked from thoughtbot/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvimrc
675 lines (613 loc) · 17.8 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
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
" Leader
let mapleader = " "
" ; is easier than :
noremap ; :
noremap : ;
if filereadable(expand("~/.vimrc.bundles"))
source ~/.vimrc.bundles
endif
set backspace=2 " Backspace deletes like most programs in insert mode
set nobackup
set nowritebackup
set noswapfile " http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287
set history=50
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set laststatus=2 " Always display the status line
set autowrite " Automatically :write before running commands
set iskeyword+=$,%
set undodir=~/.vim/tmp/undo// " undo files
set undofile
set undolevels=1000 "maximum number of changes that can be undone
set undoreload=10000 "maximum number lines to save for undo on a buffer reload
set mouse=a
" Encoding
set enc=utf-8
set fenc=utf-8 " default fileencoding
set fencs=ucs-bom,utf-8,gb18030,gbk,gb2312,cp936,big5,euc-jp,euc-kr,latin1
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on")
syntax on
endif
" formatoptions
" o - insert command leader in o or O
" t - autowrap text
" c - autowrap comments
" r - insert comment leader
" mM - useful for Chinese characters, q - gq
" j - remove comment leader when joining lines
autocmd! FileType * setlocal formatoptions-=t
" Softtabs, 4 spaces
set tabstop=2
set shiftwidth=2
set shiftround
set expandtab
" Display extra whitespace
set list listchars=tab:»·,trail:⌴,conceal:…,extends:❯,precedes:❮,nbsp:_
" set tag location
set tags=./tags;/
set tags+=gems.tags
" Color scheme
if has('termguicolors')
set termguicolors
endif
set background=dark
colorscheme everforest
" set guifont=Menlo\ Regular:h13
" set guifont=Source\ Code\ Pro\ Semibold:h18
" set guifont=SF\ Mono\ Medium:h16
set guifont=JetBrains\ Mono\ Medium\ Nerd\ Font\ Complete\ Mono:h16
" Make it obvious where 80 characters is
set textwidth=80
set colorcolumn=+1
" Numbers
set number
set numberwidth=5
" Tab completion
" will insert tab at beginning of line,
" will use completion if not at beginning
set wildmode=list:longest,list:full
set wildignore+=*.dll,*.o,*.obj,*.bak,*.exe,*.zip
set wildignore+=*.jpg,*.jpeg,*.gif,*.png,*.bmp
set wildignore+=*~,*.sw?,*.DS_Store
set wildignore+=*$py.class,*.class,*.gem,*.pyc,*.aps,*.vcxproj.*
set wildignore+=.git,.gitkeep,.hg,.svn,.tmp,.coverage,.sass-cache
set wildignore+=log/**,tmp/**,node_modules/**,build/**,_site/**,dist/**
set wildignore+=vendor/bundle/**,vendor/cache/**,vendor/gems/**
" Always use vertical diffs
set diffopt+=vertical
set scrolloff=5
" Remove trailing whitespaces when saving
" Wanna know more? http://vim.wikia.com/wiki/Remove_unwanted_spaces
autocmd BufWritePre * :%s/\s\+$//e
set nofoldenable
set foldlevel=1
set foldmethod=indent
" Automatically fitting a quickfix window height: min=3, max=40
au FileType qf call AdjustWindowHeight(3, 40)
function! AdjustWindowHeight(minheight, maxheight)
exe max([min([line("$"), a:maxheight]), a:minheight]) . "wincmd _"
endfunction
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Key Mappings {{{
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" tabs and windows {{{
" Switch between tab 1 ~ 9
" for i in range(1, 9)
" exec "nnoremap \\".i." ".i."gt"
" endfor
" nnoremap <left> :tabprevious<cr>
" nnoremap <right> :tabnext<cr>
" nnoremap <down> :tabclose<CR>
" nnoremap \( :tabprevious<cr>
" nnoremap \) :tabnext<cr>
" nnoremap \t :tab split<CR>
" nnoremap \T :tabnew<CR>
" splitting
set splitright
set splitbelow
" Smart way to move btw. windows
nmap <C-j> <C-W>j
nmap <C-k> <C-W>k
nmap <C-h> <C-W>h
nmap <C-l> <C-W>l
" }}}
" Function keys {{{
" F1
" F2 Insert date and time
" inoremap <F2> <C-R>=strftime("%Y-%m-%d %H:%M:%S")<CR>
" F3 Toggle NERDTree
" F4
" nnoremap <F4> :TagbarToggle<cr>
" inoremap <F4> <ESC>:TagbarToggle<cr>
" F5 Toggle Tagbar
" F6 Toggle Paste mode
" set pastetoggle=<F6>
" F7 Tigger Syntastic manual check
" F8
" nnoremap <silent> <F8> :call DiffToggle()<CR>
" F9 Toggle iTerm 2
" F10
" F11 Toggle Goyo
" F12 Toggle ZoomWin
" function! DiffToggle()
" if &diff
" windo diffoff
" else
" windo diffthis
" endif
" :endfunction
" }}}
" Special keys {{{
" Use <Tab> and <S-Tab> to indent
nnoremap <tab> %
" vnoremap <s-tab> %
" nnoremap <silent> <BS> %
" Move a line of text using <up><down>
" http://vim.wikia.com/wiki/Moving_lines_up_or_down
" nnoremap <up> :m .-2<CR>==
" nnoremap <down> :m .+1<CR>==
" vnoremap <up> :m '<-2<CR>gv=gv
" vnoremap <down> :m '>+1<CR>gv=gv
" Move to prev/next buffer
" nnoremap <left> <ESC>:bN<CR>
" nnoremap <right> <ESC>:bn<CR>
" press Backspace to toggle the current fold open/closed. However, if the cursor is not in a fold, move to the right
" nnoremap <silent> <BS> @=(foldlevel('.')?'za':"\<BS>")<CR>
" }}}
" Characters (Normal Mode) {{{
" <~> Switch character case
" <0> Go to first non-blank character
nnoremap 0 ^
" <!>
" <@> Register
" <#> Search word under cursor backwards
" <$> To the end of the line
" <%> Move between open/close tags
" *<%> Move to percentage of file
" <^> To the first non-blank character of the line.
" <&> Synonym for `:s` (repeat last substitute)
" <*> Search word under cursor forwards
" <(> Sentences backward
" <)> Sentences forward
" <_> Quick Horizonal split
nnoremap _ :sp<cr>
" <==> Format current line
" <+> Switch
" <q>* Record Macro
" <Q> Repeat last recorded Macro
" nnoremap Q @@
" <w> Word forwards
" <W> Word forwards
" <e> Forwards to the end of word
" <E> Forwards to the end of word
" <r> Replace character
" <R> Continous replace
" <t> find to left (exclusive)
" <T> find to left (inclusive)
" <y> Yank into register
" <Y> Yanking to the end of line
nnoremap Y y$
" <u> Undo
inoremap uu _
inoremap hh -
inoremap ii =
inoremap kk ->
inoremap jk =>
inoremap vv <Bar>>
inoremap EE <-
inoremap BB %
" <U> Undo all latest changes on last changed line
" <i> Insert
" <I> Insert at beginning of line
" <o> Open new line below
" <O> Open new line above
" <p> Paste yank after, keep cursor position
nnoremap p p`[
" <p> Paste yank before, keep cursor position
nnoremap P P`[
" <[> tpope/unimpaired
" <{> Paragraphs backward
" <]> tpope/unimpaired
" <}> Paragraphs forward
" <\> Toggle folding
" <|> Quick vertical split
nnoremap <bar> :vsp<cr>
" <a> Append insert
" <A> Append at end of line
" <s> EasyMotion
" <S> Substitue, don't update default register
nnoremap S "_s
" <d> Delete
" <D> Delete to end of line
" <f> find to right (exclusive)
" <F> find to right (inclusive)
" <g> Go and Unite mappings
" <G> Go to end of file
" *<G> Go to specific line number
" <h> Left
" <H> Go to beginning of line. Goes to previous line if repeated
nnoremap <expr> H getpos('.')[2] == 1 ? 'k' : '^'
" <j> Down
nnoremap j gj
inoremap jj <Esc>
" <J> Join Sentences
" <k> Up
nnoremap k gk
" <K>
" <l> Right
" <L> Go to end of line. Goes to next line if repeated
nnoremap <expr> L <SID>end_of_line()
function! s:end_of_line()
let l = len(getline('.'))
if (l == 0 || l == getpos('.')[2])
return 'jg_'
else
return 'g_'
endfunction
" <;> Repeat last find f,t,F,T
" <:> Input Command
" <'>* Move to {a-zA-Z} mark
" <z>* Folding
" <x> Delete char under cursor
" <X> Delete char before cursor
" <c> Change, don't update default register
nnoremap c "_c
" <C> Change to end of line, don't update register
nnoremap C "_C
" <v> Visual
" <V> Visual line
" <b> Words backwards
" <B> Words backwards
" <n> Next search
" <N> Previous search
" <m>* Set mark {a-zA-Z}
" <M> Move cursor to centre of screen
" <,> Leader
" [<] Left Indent
" vnoremap < <gv
" <.> Repeat last command
" [>] Right Indent
" vnoremap > >gv
" </> Search
" nnoremap / /\v
" vnoremap / /\v
" <?> Search backwards
" nnoremap ? ?\v
" vnoremap ? ?\v
" <space> Enter <space> used as Leader
nnoremap <leader><leader> <c-^>
" <Enter> Insert New Line without going into insert mode
nnoremap <Enter> o<ESC>
" nnoremap tn :tnext<CR>
" nnoremap tp :tprevious<CR>
" }}}
" <leader>* {{{
" <leader>1 add a '====' line above/after current line
" nnoremap <leader>1 :normal "lyy"lpwv$r=^"lyyk"lP<cr>
" <leader>2
" nnoremap <leader>2 :normal "lyy"lpwv$r-^"lyyk"lP<cr>
" <leader>3
" nnoremap <leader>3 :normal "lyy"lpwv$r#^"lyyk"lP<cr>
" <leader>4
" nnoremap <leader>4 80A=<Esc>d80<Bar>
" <leader>5
" Markdown headings
" nnoremap <leader>11 m`yypVr=``
" nnoremap <leader>22 m`yypVr-``
" nnoremap <leader>11 m`^i# <esc>``2l
" nnoremap <leader>22 m`^i## <esc>``3l
" nnoremap <leader>33 m`^i### <esc>``4l
" nnoremap <leader>44 m`^i#### <esc>``5l
" nnoremap <leader>55 m`^i##### <esc>``6l
" <leader>6
" <leader>7
" <leader>8
" <leader>9
" <leader>0 Edit vimrc
" <leader>) Edit gvimrc
" <leader>-
" <leader>=
" <leader>q Quick Quit without save
nnoremap <leader>q :q!<CR>
" <leader>w
" nnoremap <leader>W :call ToggleWrap()<CR>
" function! ToggleWrap()
" nnoremap <buffer> j gj
" nnoremap <buffer> k gk
" nnoremap <buffer> 0 g0
" nnoremap <buffer> $ g$
" nnoremap <buffer> ^ g^
" endfunction
" <leader>e Show yank list
" <leader>u
" <leader>i
" <leader>o
" <leader>y Yank content in OS's clipboard
vnoremap <leader>y "*y
" <leader>p Paste content from OS's clipboard
nnoremap <leader>p "*p
" <leader>a
" <leader>s Spell checkings
" nnoremap <leader>ss :setlocal spell!<CR>
" nnoremap <leader>sn ]s
" nnoremap <leader>sp [s
" nnoremap <leader>sa zg
" nnoremap <leader>s? z=
" <leader>S Clear trailing whitespace
" nnoremap <leader>S :%s/\s\+$//ge<CR>:nohl<CR>
" <leader>d
" <leader>D
" <leader>f Format file
" nnoremap <leader>fj :%!js-beautify -s=2 -q -f -<CR>
" nnoremap <leader>fh :%!html-beautify -s=2 -q -f -<CR>
" nnoremap <leader>fs :%!css-beautify -s=2 -q -L -N -f -<CR>
" <leader>F Format file
" nnoremap <leader>F gg=G''
" <leader>g
" <leader>h
" <leader>j
" <leader>k
nnoremap <leader>k :Dash<CR>
" <leader>l
" <leader>L Reduce a sequence of blank lines into a single line
" nnoremap <leader>L GoZ<Esc>:g/^[ <Tab>]*$/.,/[^ <Tab>]/-j<CR>Gdd
" <leader>z
" <leader>x
" <leader>c
" <leader>v Select the just pasted text
" nnoremap <leader>v V`]
" <leader>b
" <leader>n
" use <leader>n to toggle the line number display
function! g:ToggleNuMode()
if &rnu == 1
set nornu " turn off relative number
else
set rnu
endif
endfunction
" nnoremap <leader>n :call g:ToggleNuMode()<CR>
" <leader>m
" <leader>M Remove ^M
" nnoremap <leader>M mmHmt:%s/<C-V><CR>//ge<CR>'tzt'm
" <leader>, Run Eval
" noremap <leader>; m`A;<Esc>``
" }}}
" <C-*> (Normal Mode) {{{
" <C-1> Mac Desktop Switch
" <C-2> Mac Desktop Switch
" <C-3> Mac Desktop Switch
" <C-4> Mac Desktop Switch
" <C-5> Mac Desktop Switch
" <C-6>
" <C-7>
" <C-8>
" <C-9>
" <C-0> Jump back tap
" <C-->
" <C-=>
" <C-q> Multiple select
" <C-w>
" <C-e>
" <C-r>
" <C-t>
" <C-y> Emmet Expand
" <C-u> Page up
" <C-u> Switch word case
" inoremap <C-u> <esc>mzg~iw`za
" <C-i>
" <C-o>
" <C-p>
" <C-]> Jump tag
" <C-a>
" <C-s>
" <C-d> Page Down
" <C-f> Easymotion
" <C-g>
" <C-h> Move to left window
" <C-j> Move to down window
" <C-k> Move to up window
" <C-l> Move to right window
" <C-;>
" <C-'>
" <C-z>
" <C-x>
" <C-c>
" <C-v>
" <C-b> Switch Buffers
" <C-n>
" <C-m>
" <C-,>
" <C-.>
" }}}
" <C-*> (Insert Mode) {{{
" inoremap <expr> <C-j> pumvisible() ? "\<C-e>\<Down>" : "\<Down>"
" inoremap <expr> <C-k> pumvisible() ? "\<C-e>\<Up>" : "\<Up>"
" inoremap <C-H> <S-Left>
" inoremap <C-L> <S-Right>
" inoremap <C-B> <Left>
" inoremap <C-F> <Right>
inoremap <C-A> <C-O>^
inoremap <C-E> <End>
" inoremap <C-D> <C-R>=AutoPairsDelete()<CR>
" inoremap <C-BS> <C-W>
" inoremap <D-BS> <S-Right><C-W>
" }}}
" <C-*> (Command Mode) {{{
cnoremap <C-A> <Home>
cnoremap <C-E> <End>
" cnoremap <C-F> <Right>
" cnoremap <C-B> <Left>
" cnoremap <C-N> <Down>
" cnoremap <C-P> <Up>
cnoremap <C-K> <C-\>e getcmdpos() == 1 ? '' : getcmdline()[:getcmdpos()-2]<CR>
" cnoremap <C-D> <Del>
cnoremap <C-Y> <C-r>*
cnoremap %% <C-R>=expand('%:h').'/'<cr>
" }}}
" ----------------------------------------------------------------------------
" ?ie | entire object
" ----------------------------------------------------------------------------
xnoremap <silent> ie gg0oG$
onoremap <silent> ie :<C-U>execute "normal! m`"<Bar>keepjumps normal! ggVG<CR>
" ----------------------------------------------------------------------------
" ?il | inner line
" ----------------------------------------------------------------------------
xnoremap <silent> il <Esc>^vg_
onoremap <silent> il :<C-U>normal! ^vg_<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Additional Settings {{{
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Source vimrc after saving it {{{
autocmd! BufWritePost .vimrc source $MYVIMRC
" Quick edit _vimrc template
" noremap <leader>0 :tabe $MYVIMRC<CR>
" noremap <leader>) :tabe $MYGVIMRC<CR>
" }}}
" When editing a file, always jump to the last known cursor position.
" Don't do it for commit messages, when the position is invalid, or when
" inside an event handler (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
" Update diff after save {{{
autocmd! InsertLeave,BufWritePost * if &l:diff | diffupdate | endif
" }}}
" Snippets {{{
autocmd! FileType neosnippet,snippet set noexpandtab
" }}}
" Ruby Mappings {{{
autocmd! FileType ruby,eruby,rdoc :call s:RubyDef()
function! s:RubyDef()
" setlocal shiftwidth=2
" setlocal tabstop=2
" Surround % to %
let b:surround_37 = "<% \r %>"
xmap % S%
" Surround = to %=
let b:surround_61 = "<%= \r %>"
xmap _ S=
" Surround # to #{}
let b:surround_35 = "#{ \r }"
xmap # S#
" Correct typos
iab elseif elsif
iab ~= =~
endfunction
" }}}
" Golang Mappings {{{
autocmd! FileType go :call s:GolangDef()
function! s:GolangDef()
" setlocal noexpandtab
" setlocal shiftwidth=4
" setlocal softtabstop=4
" setlocal tabstop=4
command! -bang A call go#alternate#Switch(<bang>0, 'edit')
command! -bang AV call go#alternate#Switch(<bang>0, 'vsplit')
endfunction
" }}}
" CoffeeScript Mappings {{{
" autocmd! FileType coffee :call s:CoffeeDef()
" function! s:CoffeeDef()
" setlocal shiftwidth=2
" setlocal tabstop=2
" endfunction
" }}}
" Javascript Mappings {{{
" autocmd! FileType javascript :call s:JavascriptDef()
" Format using Prettier
" autocmd FileType javascript set formatprg=prettier\ --single-quote\ --trailing-comma\ es5\ --stdin
" autocmd BufWritePre *.js :normal gggqG
" autocmd BufWritePre *.js exe "normal! gggqG\<C-o>\<C-o>"
" function! s:JavascriptDef()
" setlocal shiftwidth=2
" setlocal tabstop=2
" endfunction
" }}}
" Html/Xml Mappings {{{
autocmd! FileType xhtml,html,slim,jade,xml,yaml :call s:WebDef()
function! s:WebDef()
" setlocal shiftwidth=2
" setlocal tabstop=2
setlocal foldmethod=indent
setlocal foldlevel=1
" Surround % to {{
let b:surround_37 = "{{ \r }}"
xmap % S%
" Surround = to {{=
let b:surround_61 = "{{= \r }}"
xmap _ S=
" Surround * to <!--
let b:surround_42 = "<!-- \r -->"
xmap 8 S*
" Delete surround tag
nmap <Del> dst
" Special characters
iab ->> →
iab <<- ←
iab >> »
iab ^^ ↑
iab VV ↓
endfunction
" }}}
" Markdown Mappings {{{
autocmd! FileType markdown :call s:MarkdownDef()
function! s:MarkdownDef()
" setlocal shiftwidth=2
" setlocal tabstop=2
setlocal nospell
setlocal wrap
" Surround _ to _
let b:surround_95 = "_\r_"
xmap _ S_
" Surround * to **
let b:surround_42 = "**\r**"
xmap 8 S*
" Surround - to ~~
let b:surround_45 = "~~\r~~"
xmap - S-
" Add more parentheses
let b:AutoPairs = { '(':')', '[':']', '{':'}',
\ "'":"'", '"':'"', '`':'`',
\ '“':'”', '‘':'’', '《':'》',
\ '「':'」', '(':')'}
" Insert date and time in Jekyll
inoremap <buffer> <F2> <C-R>=strftime("%Y-%m-%d %H:%M:%S")<CR>
" Hard wrap current paragraph
nnoremap <buffer> <D-w> gwip
" Unwrap current paragraph
nnoremap <buffer> <D-W> vipJ
" Format all paragraphs in buffer
nnoremap <buffer> <D-e> ggVGgq
" Unformat all paragraphs in buffer
nnoremap <buffer> <D-E> :%norm vipJ<CR>
" Insert headings
nnoremap <buffer> <M-1> I# <ESC>
nnoremap <buffer> <M-2> I## <ESC>
nnoremap <buffer> <M-3> I### <ESC>
nnoremap <buffer> <M-4> I#### <ESC>
" Insert inline link
vmap <buffer> <D-k> [f]a(
" Insert inline image
vmap <buffer> <D-i> [i!<ESC>f]a(
" Wrap text
nnoremap <buffer> j gj
nnoremap <buffer> k gk
nnoremap <buffer> 0 g0
nnoremap <buffer> $ g$
nnoremap <buffer> ^ g^
endfunction
augroup vimrc
autocmd!
au FileType ruby,coffee IndentLinesEnable
augroup END
" }}}
" Local config
if filereadable($HOME . "/.vimrc.local")
source ~/.vimrc.local
endif