-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc.local
More file actions
52 lines (41 loc) · 1.55 KB
/
vimrc.local
File metadata and controls
52 lines (41 loc) · 1.55 KB
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
" colors
let g:solarized_termcolors=16
color solarized
"autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
"autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
"autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
au FileType ruby,eruby setl sw=2 sts=2 et
au BufEnter,BufRead *.conf setf dosini
" Rspec.vim mappings
"map <Leader>t :call RunCurrentSpecFile()<CR>
"map <Leader>s :call RunNearestSpec()<CR>
"map <Leader>l :call RunLastSpec()<CR>
"map <Leader>a :call RunAllSpecs()<CR>
"let g:rspec_command = "!rspec {spec} --color --format doc"
" Buffers - explore/next/previous: Alt-F12, F12, Shift-F12.
nnoremap <silent> <M-F12> :ls<CR>
nnoremap <silent> <F12> :bn<CR>
nnoremap <silent> <S-F12> :bp<CR>
" GVim Big Font Fix
if has('gui_running')
set guifont=Inconsolata\ Medium\ 10
endif
" Filename search in CtrlP
let g:ctrlp_by_filename = 1
" Highlights the background in a subtle red for text that goes over the 80 column limit
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
" Line wrap
:set wrap
" Toggle paste mode
set pastetoggle=<F10>
" emoji autocomplete for git commit messages
augroup filetype_gitcommit
autocmd!
au BufEnter COMMIT_EDITMSG set completefunc=emoji#complete
au BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0])
augroup END
" start on first line when editing git commit
au FileType gitcommit au! BufEnter PULLREQ_EDITMSG call setpos('.', [0, 1, 1, 0])
" shortcut to save a file with sudo
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!