diff options
-rw-r--r-- | .gitignore (renamed from .vim/.gitignore) | 0 | ||||
-rw-r--r-- | .gitmodules | 4 | ||||
-rw-r--r-- | .netrwhist | 4 | ||||
-rw-r--r-- | .screen/doc/shortcuts.txt | 3 | ||||
-rw-r--r-- | .screenrc | 27 | ||||
-rw-r--r-- | .vim/.gitmodules | 3 | ||||
m--------- | .vim/plugins/Vundle.vim | 0 | ||||
-rw-r--r-- | colors/coderonline.vim (renamed from .vim/colors/coderonline.vim) | 0 | ||||
-rw-r--r-- | doc/INSTALL (renamed from .vim/doc/INSTALL) | 0 | ||||
-rw-r--r-- | doc/coderonline-vim.png (renamed from .vim/doc/coderonline-vim.png) | bin | 195172 -> 195172 bytes | |||
-rw-r--r-- | doc/readme.md (renamed from .vim/doc/readme.md) | 0 | ||||
-rw-r--r-- | doc/shortcuts.txt (renamed from .vim/doc/shortcuts.txt) | 0 | ||||
-rw-r--r-- | favicon.ico (renamed from .vim/favicon.ico) | bin | 32038 -> 32038 bytes | |||
-rw-r--r-- | gvim.desktop (renamed from .vim/gvim.desktop) | 0 | ||||
-rw-r--r-- | indent/.keep (renamed from .vim/indent/.keep) | 0 | ||||
-rw-r--r-- | indent/html5.vim | 387 | ||||
-rw-r--r-- | indent/php.vim | 37 | ||||
-rw-r--r-- | spell/.keep (renamed from .vim/spell/.keep) | 0 | ||||
-rw-r--r-- | temp/.keep (renamed from .vim/temp/.keep) | 0 | ||||
-rw-r--r-- | vimrc (renamed from .vim/vimrc) | 0 | ||||
-rw-r--r-- | ycm_extra_conf.py | 145 | ||||
-rw-r--r-- | ycm_extra_conf.pyc | bin | 0 -> 2659 bytes |
22 files changed, 575 insertions, 35 deletions
diff --git a/.vim/.gitignore b/.gitignore index 93df1ba..93df1ba 100644 --- a/.vim/.gitignore +++ b/.gitignore | |||
diff --git a/.gitmodules b/.gitmodules index a7dea0d..57ae747 100644 --- a/.gitmodules +++ b/.gitmodules | |||
@@ -1,3 +1,3 @@ | |||
1 | [submodule ".vim/plugins/Vundle.vim"] | 1 | [submodule "plugins/Vundle.vim"] |
2 | path = .vim/plugins/Vundle.vim | 2 | path = plugins/Vundle.vim |
3 | url = https://github.com/VundleVim/Vundle.vim.git | 3 | url = https://github.com/VundleVim/Vundle.vim.git |
diff --git a/.netrwhist b/.netrwhist new file mode 100644 index 0000000..430f97c --- /dev/null +++ b/.netrwhist | |||
@@ -0,0 +1,4 @@ | |||
1 | let g:netrw_dirhistmax =10 | ||
2 | let g:netrw_dirhist_cnt =2 | ||
3 | let g:netrw_dirhist_1='/home/max/.config/google-chrome' | ||
4 | let g:netrw_dirhist_2='/home/max/openvpn/cx20/client' | ||
diff --git a/.screen/doc/shortcuts.txt b/.screen/doc/shortcuts.txt deleted file mode 100644 index eba7846..0000000 --- a/.screen/doc/shortcuts.txt +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | [CTRL-A commands] | ||
2 | |||
3 | :layout save default - saves current window layout for detach/reattach | ||
diff --git a/.screenrc b/.screenrc deleted file mode 100644 index 8beaf4c..0000000 --- a/.screenrc +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | # the following two lines give a two-line status, with the current window highlighted | ||
2 | hardstatus alwayslastline | ||
3 | hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | ||
4 | |||
5 | # huge scrollback buffer | ||
6 | defscrollback 5000 | ||
7 | |||
8 | # no welcome message | ||
9 | startup_message off | ||
10 | |||
11 | # 256 colors | ||
12 | attrcolor b ".I" | ||
13 | termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' | ||
14 | defbce on | ||
15 | |||
16 | # mouse tracking allows to switch region focus by clicking | ||
17 | mousetrack on | ||
18 | defmousetrack on | ||
19 | |||
20 | # default windows | ||
21 | # get rid of silly xoff stuff | ||
22 | bind s split | ||
23 | |||
24 | |||
25 | # Use X scrolling mechanism | ||
26 | termcapinfo xterm* ti@:te@ | ||
27 | |||
diff --git a/.vim/.gitmodules b/.vim/.gitmodules deleted file mode 100644 index 57ae747..0000000 --- a/.vim/.gitmodules +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | [submodule "plugins/Vundle.vim"] | ||
2 | path = plugins/Vundle.vim | ||
3 | url = https://github.com/VundleVim/Vundle.vim.git | ||
diff --git a/.vim/plugins/Vundle.vim b/.vim/plugins/Vundle.vim deleted file mode 160000 | |||
Subproject 4984767509e3d05ca051e253c8a8b37de784be4 | |||
diff --git a/.vim/colors/coderonline.vim b/colors/coderonline.vim index f842b28..f842b28 100644 --- a/.vim/colors/coderonline.vim +++ b/colors/coderonline.vim | |||
diff --git a/.vim/doc/INSTALL b/doc/INSTALL index 50a2f08..50a2f08 100644 --- a/.vim/doc/INSTALL +++ b/doc/INSTALL | |||
diff --git a/.vim/doc/coderonline-vim.png b/doc/coderonline-vim.png index ac76bff..ac76bff 100644 --- a/.vim/doc/coderonline-vim.png +++ b/doc/coderonline-vim.png | |||
Binary files differ | |||
diff --git a/.vim/doc/readme.md b/doc/readme.md index 800c1a2..800c1a2 100644 --- a/.vim/doc/readme.md +++ b/doc/readme.md | |||
diff --git a/.vim/doc/shortcuts.txt b/doc/shortcuts.txt index 9c168f9..9c168f9 100644 --- a/.vim/doc/shortcuts.txt +++ b/doc/shortcuts.txt | |||
diff --git a/.vim/favicon.ico b/favicon.ico index ca0b3c3..ca0b3c3 100644 --- a/.vim/favicon.ico +++ b/favicon.ico | |||
Binary files differ | |||
diff --git a/.vim/gvim.desktop b/gvim.desktop index 37c6e58..37c6e58 100644 --- a/.vim/gvim.desktop +++ b/gvim.desktop | |||
diff --git a/.vim/indent/.keep b/indent/.keep index f8e463a..f8e463a 100644 --- a/.vim/indent/.keep +++ b/indent/.keep | |||
diff --git a/indent/html5.vim b/indent/html5.vim new file mode 100644 index 0000000..94baa87 --- /dev/null +++ b/indent/html5.vim | |||
@@ -0,0 +1,387 @@ | |||
1 | " Description: HTML5 and inline SVG indenter | ||
2 | " Changed By: HT de Beer <H.T.de.Beer@gmail.com> | ||
3 | " Last Change: 20121013 | ||
4 | " Added the SVG elements to the list of indenting element. SVG elements | ||
5 | " taken from http://www.w3.org/TR/SVG/eltindex.html | ||
6 | " | ||
7 | " Description: html5 (and html4) indenter | ||
8 | " Changed By: Brian Gershon <brian.five@gmail.com> | ||
9 | " Last Change: 30 Jan 2011 | ||
10 | " | ||
11 | " 1. Started with vim72 html indent file authored by Johannes Zellner (below) | ||
12 | " 2. Added html5 list as described here: | ||
13 | " http://stackoverflow.com/questions/3232518/how-to-update-vim-to-color-code-new-html-elements | ||
14 | " 3. Added this to a fork of https://github.com/othree/html5.vim | ||
15 | " which already provides nice html5 syntax highlighting. | ||
16 | " | ||
17 | " Description: html indenter | ||
18 | " Author: Johannes Zellner <johannes@zellner.org> | ||
19 | " Last Change: Mo, 05 Jun 2006 22:32:41 CEST | ||
20 | " Restoring 'cpo' and 'ic' added by Bram 2006 May 5 | ||
21 | " Globals: | ||
22 | " let g:html_indent_tags = 'html\|p\|time' | ||
23 | " let g:html_exclude_tags = ['html', 'style', 'script', 'body'] | ||
24 | |||
25 | |||
26 | " Only load this indent file when no other was loaded. | ||
27 | if exists("b:did_indent") | ||
28 | finish | ||
29 | endif | ||
30 | runtime! indent/javascript.vim | ||
31 | let s:jsindent = &indentexpr | ||
32 | unlet b:did_indent | ||
33 | runtime! indent/css.vim | ||
34 | let s:cssindent = &indentexpr | ||
35 | let b:did_indent = 1 | ||
36 | |||
37 | " [-- local settings (must come before aborting the script) --] | ||
38 | setlocal indentexpr=HtmlIndentGet(v:lnum) | ||
39 | setlocal indentkeys=o,O,*<Return>,<>>,{,},!^F | ||
40 | |||
41 | |||
42 | let s:tags = [] | ||
43 | |||
44 | " [-- <ELEMENT ? - - ...> --] | ||
45 | call add(s:tags, 'a') | ||
46 | call add(s:tags, 'abbr') | ||
47 | call add(s:tags, 'acronym') | ||
48 | call add(s:tags, 'address') | ||
49 | call add(s:tags, 'b') | ||
50 | call add(s:tags, 'bdo') | ||
51 | call add(s:tags, 'big') | ||
52 | call add(s:tags, 'blockquote') | ||
53 | call add(s:tags, 'button') | ||
54 | call add(s:tags, 'caption') | ||
55 | call add(s:tags, 'center') | ||
56 | call add(s:tags, 'cite') | ||
57 | call add(s:tags, 'code') | ||
58 | call add(s:tags, 'colgroup') | ||
59 | call add(s:tags, 'del') | ||
60 | call add(s:tags, 'dfn') | ||
61 | call add(s:tags, 'dir') | ||
62 | call add(s:tags, 'div') | ||
63 | call add(s:tags, 'dl') | ||
64 | call add(s:tags, 'dt') | ||
65 | call add(s:tags, 'dd') | ||
66 | call add(s:tags, 'em') | ||
67 | call add(s:tags, 'fieldset') | ||
68 | call add(s:tags, 'font') | ||
69 | call add(s:tags, 'form') | ||
70 | call add(s:tags, 'frameset') | ||
71 | call add(s:tags, 'h1') | ||
72 | call add(s:tags, 'h2') | ||
73 | call add(s:tags, 'h3') | ||
74 | call add(s:tags, 'h4') | ||
75 | call add(s:tags, 'h5') | ||
76 | call add(s:tags, 'h6') | ||
77 | call add(s:tags, 'i') | ||
78 | call add(s:tags, 'iframe') | ||
79 | call add(s:tags, 'ins') | ||
80 | call add(s:tags, 'kbd') | ||
81 | call add(s:tags, 'label') | ||
82 | call add(s:tags, 'legend') | ||
83 | call add(s:tags, 'li') | ||
84 | call add(s:tags, 'map') | ||
85 | call add(s:tags, 'menu') | ||
86 | call add(s:tags, 'noframes') | ||
87 | call add(s:tags, 'noscript') | ||
88 | call add(s:tags, 'object') | ||
89 | call add(s:tags, 'ol') | ||
90 | call add(s:tags, 'optgroup') | ||
91 | call add(s:tags, 'p') | ||
92 | " call add(s:tags, 'pre') | ||
93 | call add(s:tags, 'q') | ||
94 | call add(s:tags, 's') | ||
95 | call add(s:tags, 'samp') | ||
96 | call add(s:tags, 'script') | ||
97 | call add(s:tags, 'select') | ||
98 | call add(s:tags, 'small') | ||
99 | call add(s:tags, 'span') | ||
100 | call add(s:tags, 'strong') | ||
101 | call add(s:tags, 'style') | ||
102 | call add(s:tags, 'sub') | ||
103 | call add(s:tags, 'sup') | ||
104 | call add(s:tags, 'table') | ||
105 | call add(s:tags, 'textarea') | ||
106 | call add(s:tags, 'title') | ||
107 | call add(s:tags, 'tt') | ||
108 | call add(s:tags, 'u') | ||
109 | call add(s:tags, 'ul') | ||
110 | call add(s:tags, 'var') | ||
111 | |||
112 | " New HTML 5 elements | ||
113 | call add(s:tags, 'article') | ||
114 | call add(s:tags, 'aside') | ||
115 | call add(s:tags, 'audio') | ||
116 | call add(s:tags, 'canvas') | ||
117 | call add(s:tags, 'datalist') | ||
118 | call add(s:tags, 'details') | ||
119 | call add(s:tags, 'figcaption') | ||
120 | call add(s:tags, 'figure') | ||
121 | call add(s:tags, 'footer') | ||
122 | call add(s:tags, 'header') | ||
123 | call add(s:tags, 'hgroup') | ||
124 | call add(s:tags, 'main') | ||
125 | call add(s:tags, 'mark') | ||
126 | call add(s:tags, 'meter') | ||
127 | call add(s:tags, 'nav') | ||
128 | call add(s:tags, 'output') | ||
129 | call add(s:tags, 'progress') | ||
130 | call add(s:tags, 'picture') | ||
131 | call add(s:tags, 'rb') | ||
132 | call add(s:tags, 'rp') | ||
133 | call add(s:tags, 'rt') | ||
134 | call add(s:tags, 'rtc') | ||
135 | call add(s:tags, 'ruby') | ||
136 | call add(s:tags, 'section') | ||
137 | call add(s:tags, 'source') | ||
138 | call add(s:tags, 'summary') | ||
139 | call add(s:tags, 'time') | ||
140 | call add(s:tags, 'video') | ||
141 | call add(s:tags, 'bdi') | ||
142 | call add(s:tags, 'data') | ||
143 | |||
144 | " Web Component | ||
145 | call add(s:tags, 'template') | ||
146 | |||
147 | " Common inline used SVG elements | ||
148 | call add(s:tags, 'clipPath') | ||
149 | call add(s:tags, 'defs') | ||
150 | call add(s:tags, 'desc') | ||
151 | call add(s:tags, 'filter') | ||
152 | call add(s:tags, 'foreignObject') | ||
153 | call add(s:tags, 'g') | ||
154 | call add(s:tags, 'linearGradient') | ||
155 | call add(s:tags, 'marker') | ||
156 | call add(s:tags, 'mask') | ||
157 | call add(s:tags, 'pattern') | ||
158 | call add(s:tags, 'radialGradient') | ||
159 | call add(s:tags, 'svg') | ||
160 | call add(s:tags, 'switch') | ||
161 | call add(s:tags, 'symbol') | ||
162 | call add(s:tags, 'text') | ||
163 | call add(s:tags, 'textPath') | ||
164 | call add(s:tags, 'tref') | ||
165 | call add(s:tags, 'tspan') | ||
166 | |||
167 | call add(s:tags, 'html') | ||
168 | call add(s:tags, 'head') | ||
169 | call add(s:tags, 'body') | ||
170 | |||
171 | call add(s:tags, 'thead') | ||
172 | call add(s:tags, 'tbody') | ||
173 | call add(s:tags, 'tfoot') | ||
174 | call add(s:tags, 'tr') | ||
175 | call add(s:tags, 'th') | ||
176 | call add(s:tags, 'td') | ||
177 | |||
178 | |||
179 | |||
180 | let s:omittable = [ | ||
181 | \ ['address', 'article', 'aside', 'blockquote', 'dir', 'div', 'dl', 'fieldset', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'menu', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'], | ||
182 | \ ['dt', 'dd'], | ||
183 | \ ['li'], | ||
184 | \ ['thead', 'tbody', 'tfoot'], | ||
185 | \ ['th', 'td'], | ||
186 | \] | ||
187 | |||
188 | if exists('g:html_exclude_tags') | ||
189 | for tag in g:html_exclude_tags | ||
190 | call remove(s:tags, index(s:tags, tag)) | ||
191 | endfor | ||
192 | endif | ||
193 | let s:html_indent_tags = join(s:tags, '\|') | ||
194 | let s:html_indent_tags = s:html_indent_tags.'\|\w\+\(-\w\+\)\+' | ||
195 | if exists('g:html_indent_tags') | ||
196 | let s:html_indent_tags = s:html_indent_tags.'\|'.g:html_indent_tags | ||
197 | endif | ||
198 | |||
199 | let s:cpo_save = &cpo | ||
200 | set cpo-=C | ||
201 | |||
202 | " [-- count indent-increasing tags of line a:lnum --] | ||
203 | fun! <SID>HtmlIndentOpen(lnum, pattern) | ||
204 | let s = substitute('x'.getline(a:lnum), | ||
205 | \ '.\{-}\(\(<\)\('.a:pattern.'\)\>\)', "\1", 'g') | ||
206 | let s = substitute(s, "[^\1].*$", '', '') | ||
207 | return strlen(s) | ||
208 | endfun | ||
209 | |||
210 | " [-- count indent-decreasing tags of line a:lnum --] | ||
211 | fun! <SID>HtmlIndentClose(lnum, pattern) | ||
212 | let s = substitute('x'.getline(a:lnum), | ||
213 | \ '.\{-}\(\(<\)/\('.a:pattern.'\)\>>\)', "\1", 'g') | ||
214 | let s = substitute(s, "[^\1].*$", '', '') | ||
215 | return strlen(s) | ||
216 | endfun | ||
217 | |||
218 | " [-- count indent-increasing '{' of (java|css) line a:lnum --] | ||
219 | fun! <SID>HtmlIndentOpenAlt(lnum) | ||
220 | return strlen(substitute(getline(a:lnum), '[^{]\+', '', 'g')) | ||
221 | endfun | ||
222 | |||
223 | " [-- count indent-decreasing '}' of (java|css) line a:lnum --] | ||
224 | fun! <SID>HtmlIndentCloseAlt(lnum) | ||
225 | return strlen(substitute(getline(a:lnum), '[^}]\+', '', 'g')) | ||
226 | endfun | ||
227 | |||
228 | " [-- return the sum of indents respecting the syntax of a:lnum --] | ||
229 | fun! <SID>HtmlIndentSum(lnum, style) | ||
230 | if a:style == match(getline(a:lnum), '^\s*</') | ||
231 | if a:style == match(getline(a:lnum), '^\s*</\<\('.s:html_indent_tags.'\)\>') | ||
232 | let open = <SID>HtmlIndentOpen(a:lnum, s:html_indent_tags) | ||
233 | let close = <SID>HtmlIndentClose(a:lnum, s:html_indent_tags) | ||
234 | if 0 != open || 0 != close | ||
235 | return open - close | ||
236 | endif | ||
237 | endif | ||
238 | endif | ||
239 | |||
240 | if '' != &syntax && | ||
241 | \ synIDattr(synID(a:lnum, 1, 1), 'name') =~ '\(css\|java\).*' && | ||
242 | \ synIDattr(synID(a:lnum, strlen(getline(a:lnum)), 1), 'name') | ||
243 | \ =~ '\(css\|java\).*' | ||
244 | if a:style == match(getline(a:lnum), '^\s*}') | ||
245 | return <SID>HtmlIndentOpenAlt(a:lnum) - <SID>HtmlIndentCloseAlt(a:lnum) | ||
246 | endif | ||
247 | endif | ||
248 | return 0 | ||
249 | endfun | ||
250 | |||
251 | fun! HtmlIndentGet(lnum) | ||
252 | " Find a non-empty line above the current line. | ||
253 | let lnum = prevnonblank(a:lnum - 1) | ||
254 | |||
255 | " Hit the start of the file, use zero indent. | ||
256 | if lnum == 0 | ||
257 | return 0 | ||
258 | endif | ||
259 | |||
260 | let restore_ic = &ic | ||
261 | setlocal ic " ignore case | ||
262 | |||
263 | " [-- special handling for <pre>: no indenting --] | ||
264 | if getline(a:lnum) =~ '\c</pre>' | ||
265 | \ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nWb') | ||
266 | \ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nW') | ||
267 | " we're in a line with </pre> or inside <pre> ... </pre> | ||
268 | if restore_ic == 0 | ||
269 | setlocal noic | ||
270 | endif | ||
271 | return -1 | ||
272 | endif | ||
273 | |||
274 | " [-- special handling for <javascript>: use cindent --] | ||
275 | let js = '<script' | ||
276 | let jse = '</script>' | ||
277 | |||
278 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
279 | " by Tye Zdrojewski <zdro@yahoo.com>, 05 Jun 2006 | ||
280 | " ZDR: This needs to be an AND (we are 'after the start of the pair' AND | ||
281 | " we are 'before the end of the pair'). Otherwise, indentation | ||
282 | " before the start of the script block will be affected; the end of | ||
283 | " the pair will still match if we are before the beginning of the | ||
284 | " pair. | ||
285 | " | ||
286 | if 0 < searchpair(js, '', jse, 'nWb') | ||
287 | \ && 0 < searchpair(js, '', jse, 'nW') | ||
288 | " we're inside javascript | ||
289 | if getline(searchpair(js, '', '</script>', 'nWb')) !~ '<script [^>]*type=["'']\?text\/\(html\|\(ng-\)\?template\)' | ||
290 | \ && getline(lnum) !~ js && getline(a:lnum) !~ jse | ||
291 | if restore_ic == 0 | ||
292 | setlocal noic | ||
293 | endif | ||
294 | if s:jsindent == '' | ||
295 | return cindent(a:lnum) | ||
296 | else | ||
297 | execute 'let ind = ' . s:jsindent | ||
298 | return ind | ||
299 | endif | ||
300 | endif | ||
301 | if getline(a:lnum) =~ jse | ||
302 | return indent(searchpair(js, '', jse, 'nWb')) | ||
303 | endif | ||
304 | endif | ||
305 | |||
306 | let css = '<style' | ||
307 | let csse = '</style>' | ||
308 | if 0 < searchpair(css, '', csse, 'nWb') | ||
309 | \ && 0 < searchpair(css, '', csse, 'nW') | ||
310 | " we're inside style | ||
311 | if getline(lnum) !~ css && getline(a:lnum) !~ csse | ||
312 | if restore_ic == 0 | ||
313 | setlocal noic | ||
314 | endif | ||
315 | if s:cssindent == '' | ||
316 | return cindent(a:lnum) | ||
317 | else | ||
318 | execute 'let ind = ' . s:cssindent | ||
319 | return ind | ||
320 | endif | ||
321 | endif | ||
322 | if getline(a:lnum) =~ csse | ||
323 | return indent(searchpair(css, '', csse, 'nWb')) | ||
324 | endif | ||
325 | endif | ||
326 | |||
327 | if getline(lnum) =~ '\c</pre>' | ||
328 | " line before the current line a:lnum contains | ||
329 | " a closing </pre>. --> search for line before | ||
330 | " starting <pre> to restore the indent. | ||
331 | let preline = prevnonblank(search('\c<pre>', 'bW') - 1) | ||
332 | if preline > 0 | ||
333 | if restore_ic == 0 | ||
334 | setlocal noic | ||
335 | endif | ||
336 | |||
337 | if 0 == match(getline(a:lnum), '^\s*</') | ||
338 | return indent(preline) - (1*&sw) | ||
339 | else | ||
340 | return indent(preline) | ||
341 | endif | ||
342 | endif | ||
343 | endif | ||
344 | |||
345 | let ind = <SID>HtmlIndentSum(lnum, -1) | ||
346 | let ind = ind + <SID>HtmlIndentSum(a:lnum, 0) | ||
347 | |||
348 | " Fix for conditional comment | ||
349 | if getline(a:lnum) =~ '\c<!--.*<\(html\|body\).*-->' | ||
350 | let ind = ind - 1 | ||
351 | endif | ||
352 | |||
353 | let lind = indent(lnum) | ||
354 | |||
355 | " for tags in s:omittable | ||
356 | " let tags_exp = '<\(' . join(tags, '\|') . '\)>' | ||
357 | " let close_tags_exp = '</\(' . join(tags, '\|') . '\)>' | ||
358 | " if getline(a:lnum) =~ tags_exp | ||
359 | " let block_start = search('^'.repeat(' ', lind + (&sw * ind - 1)).'\S' , 'bnW') | ||
360 | " let prev_tag = search(tags_exp, 'bW', block_start) | ||
361 | " let prev_closetag = search(close_tags_exp, 'W', a:lnum) | ||
362 | " if prev_tag && !prev_closetag | ||
363 | " let ind = ind - 1 | ||
364 | " endif | ||
365 | " endif | ||
366 | |||
367 | " if getline(a:lnum) =~ '</\w\+>' | ||
368 | " let block_start = search('^'.repeat(' ', lind + (&sw * ind - 1)).'\S' , 'bnW') | ||
369 | " let prev_tag = search(tags_exp, 'bW', block_start) | ||
370 | " let prev_closetag = search(close_tags_exp, 'W', a:lnum) | ||
371 | " if prev_tag && !prev_closetag | ||
372 | " let ind = ind - 1 | ||
373 | " endif | ||
374 | " endif | ||
375 | " endfor | ||
376 | |||
377 | if restore_ic == 0 | ||
378 | setlocal noic | ||
379 | endif | ||
380 | |||
381 | return lind + (&sw * ind) | ||
382 | endfun | ||
383 | |||
384 | let &cpo = s:cpo_save | ||
385 | unlet s:cpo_save | ||
386 | |||
387 | " [-- EOF <runtime>/indent/html.vim --] | ||
diff --git a/indent/php.vim b/indent/php.vim new file mode 100644 index 0000000..ef723a6 --- /dev/null +++ b/indent/php.vim | |||
@@ -0,0 +1,37 @@ | |||
1 | " Better indent support for PHP by making it possible to indent HTML sections | ||
2 | " as well. | ||
3 | if exists("b:did_indent") | ||
4 | finish | ||
5 | endif | ||
6 | " This script pulls in the default indent/php.vim with the :runtime command | ||
7 | " which could re-run this script recursively unless we catch that: | ||
8 | if exists('s:doing_indent_inits') | ||
9 | finish | ||
10 | endif | ||
11 | let s:doing_indent_inits = 1 | ||
12 | runtime! indent/html.vim | ||
13 | unlet b:did_indent | ||
14 | runtime! indent/php.vim | ||
15 | unlet s:doing_indent_inits | ||
16 | function! GetPhpHtmlIndent(lnum) | ||
17 | if exists('*HtmlIndent') | ||
18 | let html_ind = HtmlIndent() | ||
19 | else | ||
20 | let html_ind = HtmlIndentGet(a:lnum) | ||
21 | endif | ||
22 | let php_ind = GetPhpIndent() | ||
23 | " priority one for php indent script | ||
24 | if php_ind > -1 | ||
25 | return php_ind | ||
26 | endif | ||
27 | if html_ind > -1 | ||
28 | if getline(a:num) =~ "^<?" && (0< searchpair('<?', '', '?>', 'nWb') | ||
29 | \ || 0 < searchpair('<?', '', '?>', 'nW')) | ||
30 | return -1 | ||
31 | endif | ||
32 | return html_ind | ||
33 | endif | ||
34 | return -1 | ||
35 | endfunction | ||
36 | setlocal indentexpr=GetPhpHtmlIndent(v:lnum) | ||
37 | setlocal indentkeys+=<>> | ||
diff --git a/.vim/spell/.keep b/spell/.keep index 6d81f6e..6d81f6e 100644 --- a/.vim/spell/.keep +++ b/spell/.keep | |||
diff --git a/.vim/temp/.keep b/temp/.keep index 3d99c12..3d99c12 100644 --- a/.vim/temp/.keep +++ b/temp/.keep | |||
diff --git a/ycm_extra_conf.py b/ycm_extra_conf.py new file mode 100644 index 0000000..c4cc609 --- /dev/null +++ b/ycm_extra_conf.py | |||
@@ -0,0 +1,145 @@ | |||
1 | # Generated by YCM Generator at 2015-09-05 13:02:32.549813 | ||
2 | |||
3 | # This file is NOT licensed under the GPLv3, which is the license for the rest | ||
4 | # of YouCompleteMe. | ||
5 | # | ||
6 | # Here's the license text for this file: | ||
7 | # | ||
8 | # This is free and unencumbered software released into the public domain. | ||
9 | # | ||
10 | # Anyone is free to copy, modify, publish, use, compile, sell, or | ||
11 | # distribute this software, either in source code form or as a compiled | ||
12 | # binary, for any purpose, commercial or non-commercial, and by any | ||
13 | # means. | ||
14 | # | ||
15 | # In jurisdictions that recognize copyright laws, the author or authors | ||
16 | # of this software dedicate any and all copyright interest in the | ||
17 | # software to the public domain. We make this dedication for the benefit | ||
18 | # of the public at large and to the detriment of our heirs and | ||
19 | # successors. We intend this dedication to be an overt act of | ||
20 | # relinquishment in perpetuity of all present and future rights to this | ||
21 | # software under copyright law. | ||
22 | # | ||
23 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
24 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
25 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
26 | # IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
27 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
28 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
29 | # OTHER DEALINGS IN THE SOFTWARE. | ||
30 | # | ||
31 | # For more information, please refer to <http://unlicense.org/> | ||
32 | |||
33 | import os | ||
34 | import ycm_core | ||
35 | |||
36 | flags = [ | ||
37 | '-x', | ||
38 | 'c', | ||
39 | '-D_GNU_SOURCE', | ||
40 | '-I./', | ||
41 | '-I/usr/include', | ||
42 | '-I/usr/local/include', | ||
43 | '-Wall', | ||
44 | '-I', '../submodules/', | ||
45 | '-I', 'lib/', | ||
46 | '-I', 'submodules/qdecoder/src/', | ||
47 | ] | ||
48 | |||
49 | |||
50 | # Set this to the absolute path to the folder (NOT the file!) containing the | ||
51 | # compile_commands.json file to use that instead of 'flags'. See here for | ||
52 | # more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html | ||
53 | # | ||
54 | # You can get CMake to generate this file for you by adding: | ||
55 | # set( CMAKE_EXPORT_COMPILE_COMMANDS 1 ) | ||
56 | # to your CMakeLists.txt file. | ||
57 | # | ||
58 | # Most projects will NOT need to set this to anything; you can just change the | ||
59 | # 'flags' list of compilation flags. Notice that YCM itself uses that approach. | ||
60 | compilation_database_folder = '' | ||
61 | |||
62 | if os.path.exists( compilation_database_folder ): | ||
63 | database = ycm_core.CompilationDatabase( compilation_database_folder ) | ||
64 | else: | ||
65 | database = None | ||
66 | |||
67 | SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ] | ||
68 | |||
69 | def DirectoryOfThisScript(): | ||
70 | return os.path.dirname( os.path.abspath( __file__ ) ) | ||
71 | |||
72 | |||
73 | def MakeRelativePathsInFlagsAbsolute( flags, working_directory ): | ||
74 | if not working_directory: | ||
75 | return list( flags ) | ||
76 | new_flags = [] | ||
77 | make_next_absolute = False | ||
78 | path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ] | ||
79 | for flag in flags: | ||
80 | new_flag = flag | ||
81 | |||
82 | if make_next_absolute: | ||
83 | make_next_absolute = False | ||
84 | if not flag.startswith( '/' ): | ||
85 | new_flag = os.path.join( working_directory, flag ) | ||
86 | |||
87 | for path_flag in path_flags: | ||
88 | if flag == path_flag: | ||
89 | make_next_absolute = True | ||
90 | break | ||
91 | |||
92 | if flag.startswith( path_flag ): | ||
93 | path = flag[ len( path_flag ): ] | ||
94 | new_flag = path_flag + os.path.join( working_directory, path ) | ||
95 | break | ||
96 | |||
97 | if new_flag: | ||
98 | new_flags.append( new_flag ) | ||
99 | return new_flags | ||
100 | |||
101 | |||
102 | def IsHeaderFile( filename ): | ||
103 | extension = os.path.splitext( filename )[ 1 ] | ||
104 | return extension in [ '.h', '.hxx', '.hpp', '.hh' ] | ||
105 | |||
106 | |||
107 | def GetCompilationInfoForFile( filename ): | ||
108 | # The compilation_commands.json file generated by CMake does not have entries | ||
109 | # for header files. So we do our best by asking the db for flags for a | ||
110 | # corresponding source file, if any. If one exists, the flags for that file | ||
111 | # should be good enough. | ||
112 | if IsHeaderFile( filename ): | ||
113 | basename = os.path.splitext( filename )[ 0 ] | ||
114 | for extension in SOURCE_EXTENSIONS: | ||
115 | replacement_file = basename + extension | ||
116 | if os.path.exists( replacement_file ): | ||
117 | compilation_info = database.GetCompilationInfoForFile( | ||
118 | replacement_file ) | ||
119 | if compilation_info.compiler_flags_: | ||
120 | return compilation_info | ||
121 | return None | ||
122 | return database.GetCompilationInfoForFile( filename ) | ||
123 | |||
124 | |||
125 | def FlagsForFile( filename, **kwargs ): | ||
126 | if database: | ||
127 | # Bear in mind that compilation_info.compiler_flags_ does NOT return a | ||
128 | # python list, but a "list-like" StringVec object | ||
129 | compilation_info = GetCompilationInfoForFile( filename ) | ||
130 | if not compilation_info: | ||
131 | return None | ||
132 | |||
133 | final_flags = MakeRelativePathsInFlagsAbsolute( | ||
134 | compilation_info.compiler_flags_, | ||
135 | compilation_info.compiler_working_dir_ ) | ||
136 | |||
137 | else: | ||
138 | relative_to = DirectoryOfThisScript() | ||
139 | final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to ) | ||
140 | |||
141 | return { | ||
142 | 'flags': final_flags, | ||
143 | 'do_cache': True | ||
144 | } | ||
145 | |||
diff --git a/ycm_extra_conf.pyc b/ycm_extra_conf.pyc new file mode 100644 index 0000000..2f14c54 --- /dev/null +++ b/ycm_extra_conf.pyc | |||
Binary files differ | |||