forked from thoughtbot/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc.local
executable file
·128 lines (103 loc) · 3.39 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
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
let g:rainbow_active = 1 "0 if you want to enable it later via :RainbowToggle
" Config for vim-notes
""""""""""""""""""""""
let g:notes_directories = ['~/Documents/notes', '~/Dropbox/notes']
let NERDTreeIgnore = ['\.pyc$']
" Config for syntastic
""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:syntastic_python_checkers = ['pylint']
"Configuration for python-mode
"""""""""""""""""""""""""""""""""""""""""""""""""""""":
" Activate rope
" Keys:
" K Show python docs
" <Ctrl-Space> Rope autocomplete
" <Ctrl-c>g Rope goto definition
" <Ctrl-c>d Rope show documentation
" <Ctrl-c>f Rope find occurrences
" <Leader>b Set, unset breakpoint (g:pymode_breakpoint enabled)
" [[ Jump on previous class or function (normal, visual, operator modes)
" ]] Jump on next class or function (normal, visual, operator modes)
" [M Jump on previous class or method (normal, visual, operator modes)
" ]M Jump on next class or method (normal, visual, operator modes)
let g:pymode_rope = 1
" Documentation
let g:pymode_doc = 1
let g:pymode_doc_key = 'K'
"Linting
let g:pymode_lint = 0
let g:pymode_lint_checker = "pep8"
" Auto check on save
let g:pymode_lint_write = 1
" Support virtualenv
let g:pymode_virtualenv = 1
" Enable breakpoints plugin
let g:pymode_breakpoint = 1
let g:pymode_breakpoint_bind = '<leader>b'
" syntax highlighting
let g:pymode_syntax = 1
let g:pymode_syntax_all = 1
let g:pymode_syntax_indent_errors = g:pymode_syntax_all
let g:pymode_syntax_space_errors = g:pymode_syntax_all
" Don't autofold code
let g:pymode_folding = 0
" Disable colorcolum
let g:pymode_options_colorcolumn = 0
" udpate toc automatically
let g:vmt_auto_update_on_save = 1
"set <F12> to toggle between 'paste' and 'nopaste'
set pastetoggle=<F12>
" highlight all search pattern matches
set hlsearch
" Save as sudo with \W
noremap <Leader>W :w !sudo tee % > /dev/null
" make test commands execute using dispatch.vim
let test#strategy = "vimux"
let test#python#runner = 'pytest'
let test#python#nose#options = "--verbose -a '!integration'"
" Save as :W
command W :w
" Configuration forr nerdtree
""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <F2> :NERDTreeToggle<CR>
" Solarized configuration
""""""""""""""""""""""""""""""""""""""""""""""""""""""
"syntax enable
"set term=screen-256color
let g:solarized_termcolors=256
set background=light
colorscheme solarized
"let g:solarized_degrade=1
call togglebg#map("<F5>")
" Configuratino for ymc
""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:ycm_collect_identifiers_from_tags_files = 1
" Configuratino for scala
""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:scala_scaladoc_indent = 2
" https://github.com/pjrt/stags
function! QualifiedTagJump() abort
let l:plain_tag = expand("<cword>")
let l:orig_keyword = &iskeyword
set iskeyword+=\.
let l:word = expand("<cword>")
let &iskeyword = l:orig_keyword
let l:splitted = split(l:word, '\.')
let l:acc = []
for wo in l:splitted
let l:acc = add(l:acc, wo)
if wo ==# l:plain_tag
break
endif
endfor
let l:combined = join(l:acc, ".")
try
execute "ta " . l:combined
catch /.*E426.*/ " Tag not found
execute "ta " . l:plain_tag
endtry
endfunction
nnoremap <silent> <C-]> :<C-u>call QualifiedTagJump()<CR>
" Configuration for autotags
""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:autotagTagsFile="tags"