-
Notifications
You must be signed in to change notification settings - Fork 5
/
anderson-vimrc.vim
78 lines (58 loc) · 1.89 KB
/
anderson-vimrc.vim
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
let optional = []
let optional += ["nerdtree"]
let optional += ["tabular"]
let optional += ["webapi-vim"]
let optional += ["gist-vim"]
let optional += ["airline"]
let optional += ["tagbar"]
let optional += ["localvimrc"]
call optional#include(optional)
set nu
" set list
set listchars=tab:▸\ ,eol:¬,trail:·
" Camel-hump case boundary detection
map <leader>w cv/[a-z][A-Z^\n^ ^\t^(^[^.^_]<CR>
xmap <leader>s <Plug>Vsurround
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <leader>A :A<cr>
" let g:solarized_termcolors=16
" colorscheme solarized
colorscheme koehler
" Run the current file. Uses .vim/ruby/run_file_in_terminal.rb
noremap <leader>r :RunFileInTerminal<cr>
noremap <leader>R :RunFileAtLineInTerminal<cr>
map <leader><C-r> :let g:vim_terminal="/dev/ttys000"
noremap <leader>rr :ReRunLastFileCommand<cr>
nnoremap <leader>n :NERDTreeToggle<cr>
autocmd User Rails Rnavcommand fabricator spec/fabricators -suffix=_fabricator.rb -default=model()
map <F4> :A
map <F3> :A
map <F1> :A
" Micah
xmap <Leader>s <Plug>Vsurround
map <leader>O :NERDTreeFind<cr>
map <leader>d :exec("CocoaDoc ".expand("<cword>"))<CR>
filetype plugin on
set ofu=syntaxcomplete#Complete
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PROMOTE VARIABLE TO RSPEC LET
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! PromoteToLet()
:normal! dd
" :exec '?^\s*it\>'
:normal! P
:.s/\(\w\+\) = \(.*\)$/let(:\1) { \2 }/
:normal ==
endfunction
:command! PromoteToLet :call PromoteToLet()
:map <leader>p :PromoteToLet<CR>
map K <Nop>
autocmd Filetype gitcommit setlocal spell textwidth=72
" highlight tabs
syntax match Tab /\t/
hi Tab gui=underline guifg=blue ctermbg=blue
let g:vim_ignore = ["log", "tools", "vendor", "build", "CeedlingBuild", "tmp", "public", "node_modules","portal"]
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " Linux/MacOSX