-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc.local
89 lines (69 loc) · 2.24 KB
/
vimrc.local
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
set shell=/bin/zsh
set tabstop=2
set shiftwidth=2
set smarttab
set expandtab
set novisualbell
set noerrorbells
set wildignore+=*.o,*.obj,.git,*.pyc,log,tmp,*.jpg,*.png,*.gif
set title
" We dont need no stinkin' backup or swap files. We use git!
set nobackup
set noswapfile
" Use the system clipboard
set clipboard=unnamed
" Colors
set termguicolors
colorscheme base16-default-dark
set background=dark
set listchars=tab:▸\ ,eol:¬
set list
" Custom shortcuts
nmap <leader>ss :setlocal spell!<cr>
nmap <leader>sc :SyntasticCheck<CR>
nmap <space> :noh<cr>
" Format paragraphs quickly
vmap Q gq
nmap Q gqap
" Sudo save me a file (and make me a sandwich)
cmap w!! w !sudo tee % >/dev/null
" Some useful things
nmap <leader>rr :checktime<CR>
nmap <leader>rd :redraw!<cr>
nmap <leader>ev :e ~/.vimrc.local<cr>
nmap <leader>ebv :e ~/.vimrc.bundles.local<cr>
nmap <leader>epv :e ~/.vimrc.before.local<cr>
nmap <leader>sd <Plug>DashSearch
nmap <leader>gd <Plug>DashGlobalSearch
nmap <leader>tp :silent !thyme -d<cr> :redraw!<cr>
nmap <leader>tb :silent !thyme -db<cr> :redraw!<cr>
" Strip whitespace from certain file types
autocmd FileType c,cpp,java,php,rb,coffee,erb,slim,js,scss,css autocmd BufWritePre <buffer> :%s/\s\+$//e
let g:syntastic_html_tidy_exec = 'tidy5'
let g:syntastic_html_tidy_ignore_errors=["proprietary attribute", "is not recognized!", "discarding unexpected"]
let g:dash_map = {
\ 'coffee' : 'angularjs lodash jquery',
\ 'sass' : 'bourbon neat'
\ }
" Start interactive EasyAlign in visual mode (e.g. vip<Enter>)
vmap <Enter> <Plug>(EasyAlign)
" Start interactive EasyAlign for a motion/text object (e.g. <Leader>aip)
nmap <Leader>a <Plug>(EasyAlign)
" deoplete tab-complete
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
" For conceal markers.
if has('conceal')
set conceallevel=2 concealcursor=niv
endif
autocmd BufWritePost,BufRead * Neomake
let g:neomake_ruby_rubocop_maker = {
\ 'args': ['--format', 'emacs', '--rails'],
\ 'errorformat': '%f:%l:%c: %t: %m',
\ 'postprocess': function('neomake#makers#ft#ruby#RubocopEntryProcess')
\ }
let g:neomake_ruby_enabled_makers = ['mri', 'rubocop']
nmap <C-p> :Files<cr>
nmap <leader>g :Files<cr>
nmap <leader>b :Buffers<cr>
set rtp+=~/.fzf
set verbosefile=~/.vim.verbose.log