Skip to content

Commit 795a8fb

Browse files
author
amix
committed
Updated plugins and added vim-jade
1 parent 3aabd8b commit 795a8fb

File tree

35 files changed

+1032
-127
lines changed

35 files changed

+1032
-127
lines changed

sources_non_forked/syntastic/autoload/syntastic/preprocess.vim

+34-2
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,37 @@ function! syntastic#preprocess#iconv(errors) abort " {{{2
156156
\ a:errors
157157
endfunction " }}}2
158158

159+
function! syntastic#preprocess#jscs(errors) abort " {{{2
160+
let errs = join(a:errors, '')
161+
if errs ==# ''
162+
return []
163+
endif
164+
165+
let json = s:_decode_JSON(errs)
166+
167+
let out = []
168+
if type(json) == type({})
169+
for fname in keys(json)
170+
if type(json[fname]) == type([])
171+
for e in json[fname]
172+
try
173+
let e['message'] = substitute(e['message'], "\n", ' ', 'g')
174+
cal add(out, fname . ':' . e['line'] . ':' . e['column'] . ':' . e['message'])
175+
catch /\m^Vim\%((\a\+)\)\=:E716/
176+
call syntastic#log#warn('checker javascript/jscs: unrecognized error item ' . string(e))
177+
let out = []
178+
endtry
179+
endfor
180+
else
181+
call syntastic#log#warn('checker javascript/jscs: unrecognized error format')
182+
endif
183+
endfor
184+
else
185+
call syntastic#log#warn('checker javascript/jscs: unrecognized error format')
186+
endif
187+
return out
188+
endfunction " }}}2
189+
159190
function! syntastic#preprocess#killEmpty(errors) abort " {{{2
160191
return filter(copy(a:errors), 'v:val !=# ""')
161192
endfunction " }}}2
@@ -269,15 +300,16 @@ function! syntastic#preprocess#stylelint(errors) abort " {{{2
269300

270301
for e in errs[0]['warnings']
271302
try
303+
let severity = type(e['severity']) == type(0) ? ['W', 'E'][e['severity']-1] : e['severity'][0]
272304
let msg =
273-
\ ['W', 'E'][e['severity']-1] . ':' .
305+
\ severity . ':' .
274306
\ errs[0]['source'] . ':' .
275307
\ e['line'] . ':' .
276308
\ e['column'] . ':' .
277309
\ e['text']
278310
call add(out, msg)
279311
catch /\m^Vim\%((\a\+)\)\=:E716/
280-
call syntastic#log#warn('checker css/stylelint: unrecognized error format')
312+
call syntastic#log#warn('checker css/stylelint: unrecognized error item ' . string(e))
281313
let out = []
282314
break
283315
endtry

sources_non_forked/syntastic/doc/syntastic.txt

+12-9
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@ Default: 2
439439
Use this option to tell syntastic to automatically open and/or close the
440440
|location-list| (see |syntastic-error-window|).
441441

442-
When set to 0 the error window will not be opened or closed automatically. >
442+
When set to 0 the error window will be neither opened nor closed
443+
automatically. >
443444
let g:syntastic_auto_loc_list = 0
444445
<
445446
When set to 1 the error window will be automatically opened when errors are
@@ -449,6 +450,10 @@ detected, and closed when none are detected. >
449450
When set to 2 the error window will be automatically closed when no errors are
450451
detected, but not opened automatically. >
451452
let g:syntastic_auto_loc_list = 2
453+
<
454+
When set to 3 the error window will be automatically opened when errors are
455+
detected, but not closed automatically. >
456+
let g:syntastic_auto_loc_list = 3
452457
<
453458
*'syntastic_loc_list_height'*
454459
Default: 10
@@ -956,14 +961,12 @@ mode only work with "vim-auto-save" version 0.1.7 or later.
956961
------------------------------------------------------------------------------
957962
7.10. vim-go *syntastic-vim-go*
958963

959-
The "vim-go" Vim plugin (https://github.com/fatih/vim-go) uses |quickfix|
960-
lists, and thus doesn't conflict with syntastic (which uses |location-list|
961-
lists). However, both "vim-go" and syntastic run syntax checks by default
962-
when you save buffers to disk, and this can have confusing results. To
963-
avoid both plugins opening error windows, you can either set passive
964-
mode for go in syntastic (see |syntastic_mode_map|), or prevent "vim-go"
965-
from showing a quickfix window when |g:go_fmt_command| fails, by setting
966-
|g:go_fmt_fail_silently| to 1. E.g.: >
964+
Syntastic can be used along with the "vim-go" Vim plugin (see
965+
https://github.com/fatih/vim-go). However, both "vim-go" and syntastic run
966+
syntax checks by default when you save buffers to disk. To avoid conflicts,
967+
you have to either set passive mode in syntastic for the go filetype (see
968+
|syntastic_mode_map|), or prevent "vim-go" from showing a quickfix window when
969+
|g:go_fmt_command| fails, by setting |g:go_fmt_fail_silently| to 1. E.g.: >
967970
let g:go_fmt_fail_silently = 1
968971
<
969972
------------------------------------------------------------------------------

sources_non_forked/syntastic/plugin/syntastic.vim

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if has('reltime')
1919
lockvar! g:_SYNTASTIC_START
2020
endif
2121

22-
let g:_SYNTASTIC_VERSION = '3.7.0-62'
22+
let g:_SYNTASTIC_VERSION = '3.7.0-69'
2323
lockvar g:_SYNTASTIC_VERSION
2424

2525
" Sanity checks {{{1
@@ -510,6 +510,7 @@ function! SyntasticMake(options) abort " {{{2
510510

511511
if has_key(a:options, 'errorformat')
512512
let &errorformat = a:options['errorformat']
513+
set errorformat<
513514
endif
514515

515516
if has_key(a:options, 'cwd')
@@ -662,7 +663,8 @@ function! s:_skip_file() abort " {{{2
662663
let fname = expand('%', 1)
663664
let skip = s:_is_quitting(bufnr('%')) || get(b:, 'syntastic_skip_checks', 0) ||
664665
\ (&buftype !=# '') || !filereadable(fname) || getwinvar(0, '&diff') ||
665-
\ s:_ignore_file(fname) || fnamemodify(fname, ':e') =~? g:syntastic_ignore_extensions
666+
\ getwinvar(0, '&previewwindow') || s:_ignore_file(fname) ||
667+
\ fnamemodify(fname, ':e') =~? g:syntastic_ignore_extensions
666668
if skip
667669
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, '_skip_file: skipping checks')
668670
endif
@@ -690,6 +692,9 @@ function! s:_explain_skip(filetypes) abort " {{{2
690692
if getwinvar(0, '&diff')
691693
call add(why, 'diff mode')
692694
endif
695+
if getwinvar(0, '&previewwindow')
696+
call add(why, 'preview window')
697+
endif
693698
if s:_ignore_file(fname)
694699
call add(why, 'filename matching g:syntastic_ignore_files')
695700
endif

sources_non_forked/syntastic/plugin/syntastic/autoloclist.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ endfunction " }}}2
1919

2020
function! g:SyntasticAutoloclistNotifier.AutoToggle(loclist) abort " {{{2
2121
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'autoloclist: toggle')
22+
let auto_loc_list = syntastic#util#var('auto_loc_list')
2223
if !a:loclist.isEmpty()
23-
if syntastic#util#var('auto_loc_list') == 1
24+
if auto_loc_list == 1 || auto_loc_list == 3
2425
call a:loclist.show()
2526
endif
2627
else
27-
if syntastic#util#var('auto_loc_list') > 0
28-
28+
if auto_loc_list == 1 || auto_loc_list == 2
2929
"TODO: this will close the loc list window if one was opened by
3030
"something other than syntastic
3131
lclose

sources_non_forked/syntastic/syntax_checkers/javascript/jscs.vim

+11-3
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,24 @@ endif
2121
let s:save_cpo = &cpo
2222
set cpo&vim
2323

24+
function! SyntaxCheckers_javascript_jscs_IsAvailable() dict
25+
if !executable(self.getExec())
26+
return 0
27+
endif
28+
return syntastic#util#versionIsAtLeast(self.getVersion(), [2, 1])
29+
endfunction
30+
2431
function! SyntaxCheckers_javascript_jscs_GetLocList() dict
25-
let makeprg = self.makeprgBuild({ 'args_after': '--no-colors --reporter checkstyle' })
32+
let makeprg = self.makeprgBuild({ 'args_after': '--no-colors --reporter json' })
2633

27-
let errorformat = '%f:%t:%l:%c:%m'
34+
let errorformat = '%f:%l:%c:%m'
2835

2936
return SyntasticMake({
3037
\ 'makeprg': makeprg,
3138
\ 'errorformat': errorformat,
3239
\ 'subtype': 'Style',
33-
\ 'preprocess': 'checkstyle',
40+
\ 'preprocess': 'jscs',
41+
\ 'defaults': {'type': 'E'},
3442
\ 'returns': [0, 2] })
3543
endfunction
3644

sources_non_forked/vim-airline/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ MIT License. Copyright (c) 2013-2015 Bailey Ling.
203203
[7]: https://github.com/bling/minivimrc
204204
[8]: http://en.wikipedia.org/wiki/Open/closed_principle
205205
[9]: https://github.com/Shougo/unite.vim
206-
[10]: https://github.com/kien/ctrlp.vim
206+
[10]: https://github.com/ctrlpvim/ctrlp.vim
207207
[11]: https://github.com/tpope/vim-pathogen
208208
[12]: https://github.com/Shougo/neobundle.vim
209209
[13]: https://github.com/gmarik/vundle

sources_non_forked/vim-airline/autoload/airline/extensions/branch.vim

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ if s:head_format == 1
1414
function! s:format_name(name)
1515
return fnamemodify(a:name, ':t')
1616
endfunction
17+
elseif s:head_format == 2
18+
function! s:format_name(name)
19+
return pathshorten(a:name)
20+
endfunction
1721
elseif type(s:head_format) == type('')
1822
function! s:format_name(name)
1923
return call(s:head_format, [a:name])

sources_non_forked/vim-airline/autoload/airline/extensions/wordcount.vim

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
" vim: et ts=2 sts=2 sw=2
33

44
let s:filetypes = get(g:, 'airline#extensions#wordcount#filetypes', '\vhelp|markdown|rst|org')
5+
let s:format = get(g:, 'airline#extensions#wordcount#format', '%d words')
56

67
" adapted from http://stackoverflow.com/questions/114431/fast-word-count-function-in-vim
78
function! s:update()
89
if &ft !~ s:filetypes
910
unlet! b:airline_wordcount
1011
return
12+
elseif mode() =~? 's'
13+
" Bail on select mode
14+
return
1115
endif
1216

1317
let old_status = v:statusmsg
@@ -21,7 +25,7 @@ function! s:update()
2125
if len(parts) > 11
2226
let cnt = str2nr(split(stat)[11])
2327
let spc = g:airline_symbols.space
24-
let b:airline_wordcount = cnt . spc . 'words' . spc . g:airline_right_alt_sep . spc
28+
let b:airline_wordcount = printf(s:format, cnt) . spc . g:airline_right_alt_sep . spc
2529
else
2630
unlet! b:airline_wordcount
2731
endif

sources_non_forked/vim-airline/autoload/airline/init.vim

+6-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ function! airline#init#bootstrap()
7979
\ 'accent': 'red',
8080
\ })
8181
call airline#parts#define_raw('file', '%f%m')
82+
call airline#parts#define_raw('path', '%F%m')
8283
call airline#parts#define_raw('linenr', '%{g:airline_symbols.linenr}%#__accent_bold#%4l%#__restore__#')
8384
call airline#parts#define_function('ffenc', 'airline#parts#ffenc')
8485
call airline#parts#define_empty(['hunks', 'branch', 'tagbar', 'syntastic', 'eclim', 'whitespace','windowswap'])
@@ -96,7 +97,11 @@ function! airline#init#sections()
9697
let g:airline_section_b = airline#section#create(['hunks', 'branch'])
9798
endif
9899
if !exists('g:airline_section_c')
99-
let g:airline_section_c = airline#section#create(['%<', 'file', spc, 'readonly'])
100+
if &autochdir == 1
101+
let g:airline_section_c = airline#section#create(['%<', 'path', spc, 'readonly'])
102+
else
103+
let g:airline_section_c = airline#section#create(['%<', 'file', spc, 'readonly'])
104+
endif
100105
endif
101106
if !exists('g:airline_section_gutter')
102107
let g:airline_section_gutter = airline#section#create(['%='])
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
" vim-airline companion theme of distinguished
2+
" (https://github.com/Lokaltog/vim-distinguished)
3+
" I have nothing to do with the original
4+
" distinguished theme other than being a big fan.
5+
" this theme was shamelessly created by modifying
6+
" the Ubaryd airline theme.
7+
8+
let s:gray = [245, '#8a8a8a']
9+
let s:golden = [143, '#afaf5f']
10+
let s:pink = [131, '#af5f5f']
11+
let s:blue = [ 67, '#5f87af']
12+
let s:orange = [166, '#d75f00']
13+
let s:outerfg = [ 16, '#000000']
14+
let s:innerbg = [234, '#1c1c1c']
15+
let s:middle = ['#bcbcbc', '#444444', 250, 238]
16+
17+
" Normal mode
18+
let s:N1 = [s:outerfg[1], s:gray[1], s:outerfg[0], s:gray[0]]
19+
let s:N3 = [s:gray[1], s:innerbg[1], s:gray[0], s:innerbg[0]]
20+
21+
" Insert mode
22+
let s:I1 = [s:outerfg[1], s:golden[1], s:outerfg[0], s:golden[0]]
23+
let s:I3 = [s:golden[1], s:innerbg[1], s:golden[0], s:innerbg[0]]
24+
25+
" Visual mode
26+
let s:V1 = [s:outerfg[1], s:pink[1], s:outerfg[0], s:pink[0]]
27+
let s:V3 = [s:pink[1], s:innerbg[1], s:pink[0], s:innerbg[0]]
28+
29+
" Replace mode
30+
let s:R1 = [s:outerfg[1], s:blue[1], s:outerfg[0], s:blue[0]]
31+
let s:R3 = [s:blue[1], s:innerbg[1], s:blue[0], s:innerbg[0]]
32+
33+
" Inactive pane
34+
let s:IA = [s:middle[1], s:innerbg[1], s:middle[3], s:innerbg[0]]
35+
36+
let g:airline#themes#distinguished#palette = {}
37+
let g:airline#themes#distinguished#palette.accents = {
38+
\ 'red': ['#d70000', '', 160, '', '']}
39+
40+
let g:airline#themes#distinguished#palette.inactive = {
41+
\ 'airline_a': s:IA,
42+
\ 'airline_b': s:IA,
43+
\ 'airline_c': s:IA}
44+
45+
let g:airline#themes#distinguished#palette.normal = airline#themes#generate_color_map(s:N1, s:middle, s:N3)
46+
let g:airline#themes#distinguished#palette.normal_modified = {
47+
\ 'airline_a': ['', s:orange[1], '', s:orange[0], ''],
48+
\ 'airline_c': [s:orange[1], '', s:orange[0], '', ''],
49+
\ 'airline_x': [s:orange[1], '', s:orange[0], '', ''],
50+
\ 'airline_z': ['', s:orange[1], '', s:orange[0], '']}
51+
52+
let g:airline#themes#distinguished#palette.insert = airline#themes#generate_color_map(s:I1, s:middle, s:I3)
53+
let g:airline#themes#distinguished#palette.insert_modified = {}
54+
55+
let g:airline#themes#distinguished#palette.replace = airline#themes#generate_color_map(s:R1, s:middle, s:R3)
56+
let g:airline#themes#distinguished#palette.replace_modified = {}
57+
58+
let g:airline#themes#distinguished#palette.visual = airline#themes#generate_color_map(s:V1, s:middle, s:V3)
59+
let g:airline#themes#distinguished#palette.visual_modified = {}

sources_non_forked/vim-airline/doc/airline.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,13 @@ vcscommand <http://www.vim.org/scripts/script.php?script_id=90>
320320
" default value leaves the name unmodifed
321321
let g:airline#extensions#branch#format = 0
322322
323-
" to only show the tail, e.g. a branch 'feature/foo' show 'foo'
323+
" to only show the tail, e.g. a branch 'feature/foo' becomes 'foo', use
324324
let g:airline#extensions#branch#format = 1
325325
326+
" to truncate all path sections but the last one, e.g. a branch
327+
" 'foo/bar/baz' becomes 'f/b/baz', use
328+
let g:airline#extensions#branch#format = 2
329+
326330
" if a string is provided, it should be the name of a function that
327331
" takes a string and returns the desired value
328332
let g:airline#extensions#branch#format = 'CustomBranchName'

sources_non_forked/vim-fugitive/doc/fugitive.txt

+8-6
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,9 @@ that are part of Git repositories).
221221

222222
*fugitive-:Gbrowse*
223223
:Gbrowse Open the current file, blob, tree, commit, or tag
224-
in your browser at the upstream hosting provider
225-
indicated by the "origin" remote. If a range is
226-
given, it is appropriately appended to the URL as an
227-
anchor.
224+
in your browser at the upstream hosting provider.
225+
If a range is given, it is appropriately appended to
226+
the URL as an anchor.
228227

229228
Upstream providers can be added by installing an
230229
appropriate Vim plugin. For example, GitHub can be
@@ -233,8 +232,11 @@ that are part of Git repositories).
233232
support for GitHub is currently included, but that is
234233
slated to be removed.)
235234

236-
If no upstream support is available, a local instance
237-
of git-instaweb will be started and used instead.
235+
The hosting provider is determined by looking at the
236+
remote for the current or specified branch and falls
237+
back to "origin". In the special case of a "."
238+
remote, a local instance of git-instaweb will be
239+
started and used.
238240

239241
:Gbrowse {revision} Like :Gbrowse, but for a given |fugitive-revision|. A
240242
useful value here is -, which ties the URL to the

0 commit comments

Comments
 (0)