-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
189 lines (163 loc) · 5.65 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
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
" Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Avoid a name conflict with L9
" Plugin 'user/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" ================================
" set diy configuration by Ryane
" ================================
" set coding default
syntax on
set hls " 打开搜索高亮
" raml support
Plugin 'IN3D/vim-raml'
" 代码全文检索插件
Plugin 'rking/ag.vim'
" set tab string 指定文件设置缩进字符串
autocmd BufNewFile,BufRead *.html,*.htm set noexpandtab tabstop=2 shiftwidth=2
autocmd BufNewFile,BufRead *.go set noexpandtab tabstop=2 shiftwidth=2
autocmd BufNewFile,BufRead *.raml set noexpandtab tabstop=2 shiftwidth=2
" set multi tex format support
"" Plugin 'vim-pandoc/vim-pandoc'
"" Plugin 'vim-pandoc/vim-pandoc-syntax'
" 设置折叠规则
" let g:pandoc#folding#fold_fenced_codeblocks = 1
" let g:pandoc#folding#level = 2
" 设置Conceal高亮
"" let g:pandoc#syntax#conceal#use = 0
" 设置codeblock内高亮
"" let g:pandoc#syntax#codeblocks#embeds#langs = ["js=javascript","php", "bash=sh", "golang=go", "html"]
" 禁用折叠
"" let g:pandoc#modules#disabled = ["folding"]
" set vim-multiple-cursors
Plugin 'terryma/vim-multiple-cursors'
" Default mapping
let g:multi_cursor_next_key='<C-n>'
let g:multi_cursor_prev_key='<C-p>'
let g:multi_cursor_skip_key='<C-x>'
let g:multi_cursor_quit_key='<Esc>'
" set Ultisnips
" " Track the engine.
Plugin 'SirVer/ultisnips'
" " Snippets are separated from the engine. Add this if you want them:
Plugin 'honza/vim-snippets'
let g:UltiSnipsSnippetsDir = '~/.vim/bundle/vim-snippets/UltiSnips'
set rtp+=~/.vim/ftdetect " auto load UltiSnips
" Trigger configuration. Do not use <tab> if you use
" https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<c-j>"
let g:UltiSnipsJumpForwardTrigger="<c-h>"
let g:UltiSnipsJumpBackwardTrigger="<c-l>"
" " If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
" set Syntastic 语法鉴别插件
Plugin 'scrooloose/syntastic'
nmap <F4> :SyntasticCheck<CR>
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
let g:syntastic_go_checkers = ['gofmt','govet','gotype']
" set covim
" Plugin 'FredKSchott/CoVim'
" set tagbar manager
" pacman -S ctags
Plugin 'majutsushi/tagbar'
nmap <F8> :TagbarToggle<CR>
" go get -u github.com/jstemmer/gotags
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ }
let g:tagbar_type_css = {
\ 'ctagstype' : 'Css',
\ 'kinds' : [
\ 'c:classes',
\ 's:selectors',
\ 'i:identities'
\ ]
\ }
" set filemanager
Plugin 'scrooloose/nerdtree'
" autocmd vimenter * NERDTree
" autocmd StdinReadPre * let s:std_in=1
" autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
nmap <F2> :NERDTreeToggle<CR>
" 将 NERDTree 的窗口设置在 vim 窗口的右侧(默认为左侧)
"" let NERDTreeWinPos="right"
" set YCM
Plugin 'Valloric/YouCompleteMe'
" set golang
Plugin 'nsf/gocode', {'rtp': 'vim/'}
Plugin 'fatih/vim-go' " must Run this in vim :GoInstallBinaries
Plugin 'vim-jp/vim-go-extra'
Plugin 'dgryski/vim-godef' " go get -v code.google.com/p/rog-go/exp/cmd/godef
let g:go_highlight_functions = 1 " refer to https://github.com/fatih/vim-go
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
set rtp+=$GOPATH/src/github.com/golang/lint/misc/vim
" diy layout and theme
Plugin 'zenorocha/dracula-theme', {'rtp': 'vim/'}
Plugin 'Lokaltog/vim-powerline'
" set number