Skip to content

Commit 6b48dc5

Browse files
author
amix
committedDec 16, 2015
Updated plugins
1 parent 26861f6 commit 6b48dc5

File tree

19 files changed

+575
-94
lines changed

19 files changed

+575
-94
lines changed
 

‎sources_non_forked/syntastic/plugin/syntastic.vim

+1-1
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-55'
22+
let g:_SYNTASTIC_VERSION = '3.7.0-62'
2323
lockvar g:_SYNTASTIC_VERSION
2424

2525
" Sanity checks {{{1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
"============================================================================
2+
"File: mixedindentlint.vim
3+
"Description: Mixed indentation linter for vim
4+
"Maintainer: Payton Swick <payton@foolord.com>
5+
"License: This program is free software. It comes without any warranty,
6+
" to the extent permitted by applicable law. You can redistribute
7+
" it and/or modify it under the terms of the Do What The Fuck You
8+
" Want To Public License, Version 2, as published by Sam Hocevar.
9+
" See http://sam.zoy.org/wtfpl/COPYING for more details.
10+
"============================================================================
11+
12+
if exists('g:loaded_syntastic_css_mixedindentlint_checker')
13+
finish
14+
endif
15+
let g:loaded_syntastic_css_mixedindentlint_checker = 1
16+
17+
call g:SyntasticRegistry.CreateAndRegisterChecker({
18+
\ 'filetype': 'css',
19+
\ 'name': 'mixedindentlint',
20+
\ 'redirect': 'javascript/mixedindentlint'})
21+
22+
" vim: set et sts=4 sw=4:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
"============================================================================
2+
"File: mixedindentlint.vim
3+
"Description: Mixed indentation linter for vim
4+
"Maintainer: Payton Swick <payton@foolord.com>
5+
"License: This program is free software. It comes without any warranty,
6+
" to the extent permitted by applicable law. You can redistribute
7+
" it and/or modify it under the terms of the Do What The Fuck You
8+
" Want To Public License, Version 2, as published by Sam Hocevar.
9+
" See http://sam.zoy.org/wtfpl/COPYING for more details.
10+
"============================================================================
11+
12+
if exists('g:loaded_syntastic_javascript_mixedindentlint_checker')
13+
finish
14+
endif
15+
let g:loaded_syntastic_javascript_mixedindentlint_checker = 1
16+
17+
let s:save_cpo = &cpo
18+
set cpo&vim
19+
20+
function! SyntaxCheckers_javascript_mixedindentlint_GetLocList() dict
21+
let makeprg = self.makeprgBuild({})
22+
23+
let errorformat = 'Line %l in "%f" %.%#'
24+
25+
return SyntasticMake({
26+
\ 'makeprg': makeprg,
27+
\ 'errorformat': errorformat,
28+
\ 'subtype': 'Style',
29+
\ 'defaults': { 'text': 'Indentation differs from rest of file' },
30+
\ 'returns': [0, 1] })
31+
endfunction
32+
33+
call g:SyntasticRegistry.CreateAndRegisterChecker({
34+
\ 'filetype': 'javascript',
35+
\ 'name': 'mixedindentlint'})
36+
37+
let &cpo = s:save_cpo
38+
unlet s:save_cpo
39+
40+
" vim: set sw=4 sts=4 et fdm=marker:

‎sources_non_forked/syntastic/syntax_checkers/r/lint.vim

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ endfunction
4444

4545
function! SyntaxCheckers_r_lint_GetLocList() dict
4646
let setwd = syntastic#util#isRunningWindows() ? 'setwd("' . escape(getcwd(), '"\') . '"); ' : ''
47-
let setwd = 'setwd("' . escape(getcwd(), '"\') . '"); '
4847
let makeprg = self.getExecEscaped() . ' --slave --restore --no-save' .
4948
\ ' -e ' . syntastic#util#shescape(setwd . 'library(lint); ' .
5049
\ 'try(lint(commandArgs(TRUE), ' . g:syntastic_r_lint_styles . '))') .

‎sources_non_forked/syntastic/syntax_checkers/r/lintr.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function! SyntaxCheckers_r_lintr_IsAvailable() dict
5050
endfunction
5151

5252
function! SyntaxCheckers_r_lintr_GetLocList() dict
53-
let setwd = syntastic#util#isRunningWindows() ? 'setwd(''' . escape(getcwd(), '"\') . '''); ' : ''
53+
let setwd = syntastic#util#isRunningWindows() ? 'setwd("' . escape(getcwd(), '"\') . '"); ' : ''
5454
let makeprg = self.getExecEscaped() . ' --slave --no-restore --no-save' .
5555
\ ' -e ' . syntastic#util#shescape(setwd . 'suppressPackageStartupMessages(library(lintr)); ' .
5656
\ 'lint(cache = ' . g:syntastic_r_lintr_cache . ', commandArgs(TRUE), ' . g:syntastic_r_lintr_linters . ')') .
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
"============================================================================
2+
"File: mixedindentlint.vim
3+
"Description: Mixed indentation linter for vim
4+
"Maintainer: Payton Swick <payton@foolord.com>
5+
"License: This program is free software. It comes without any warranty,
6+
" to the extent permitted by applicable law. You can redistribute
7+
" it and/or modify it under the terms of the Do What The Fuck You
8+
" Want To Public License, Version 2, as published by Sam Hocevar.
9+
" See http://sam.zoy.org/wtfpl/COPYING for more details.
10+
"============================================================================
11+
12+
if exists('g:loaded_syntastic_scss_mixedindentlint_checker')
13+
finish
14+
endif
15+
let g:loaded_syntastic_scss_mixedindentlint_checker = 1
16+
17+
call g:SyntasticRegistry.CreateAndRegisterChecker({
18+
\ 'filetype': 'scss',
19+
\ 'name': 'mixedindentlint',
20+
\ 'redirect': 'javascript/mixedindentlint'})
21+
22+
" vim: set et sts=4 sw=4:

‎sources_non_forked/vim-fugitive/plugin/fugitive.vim

+16-21
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ function! s:repo_translate(spec) dict abort
320320
return 'fugitive://'.self.dir().'//'.ref
321321
elseif a:spec =~# '^:'
322322
return 'fugitive://'.self.dir().'//0/'.a:spec[1:-1]
323+
elseif a:spec ==# '@'
324+
return self.dir('HEAD')
323325
elseif a:spec =~# 'HEAD\|^refs/' && a:spec !~ ':' && filereadable(self.dir(a:spec))
324326
return self.dir(a:spec)
325327
elseif filereadable(self.dir('refs/'.a:spec))
@@ -1258,7 +1260,7 @@ function! s:Grep(cmd,bang,arg) abort
12581260
try
12591261
execute cd.'`=s:repo().tree()`'
12601262
let &grepprg = s:repo().git_command('--no-pager', 'grep', '-n', '--no-color')
1261-
let &grepformat = '%f:%l:%m,%f'
1263+
let &grepformat = '%f:%l:%m,%m %f match%ts,%f'
12621264
exe a:cmd.'! '.escape(matchstr(a:arg,'\v\C.{-}%($|[''" ]\@=\|)@='),'|')
12631265
let list = a:cmd =~# '^l' ? getloclist(0) : getqflist()
12641266
for entry in list
@@ -1406,6 +1408,7 @@ function! s:Edit(cmd,bang,...) abort
14061408
catch /^fugitive:/
14071409
return 'echoerr v:errmsg'
14081410
endtry
1411+
let file = s:sub(file, '/$', '')
14091412
if a:cmd ==# 'read'
14101413
return 'silent %delete_|read '.s:fnameescape(file).'|silent 1delete_|diffupdate|'.line('.')
14111414
else
@@ -2175,7 +2178,7 @@ call s:command("-bar -bang -range -nargs=* -complete=customlist,s:EditComplete G
21752178

21762179
function! s:Browse(bang,line1,count,...) abort
21772180
try
2178-
let rev = a:0 ? substitute(join(a:000, ' '),'@[[:alnum:]_-]*\%(://.\{-\}\)\=$','','') : ''
2181+
let rev = a:0 ? substitute(join(a:000, ' '),'@[[:alnum:]_-]\w\+\%(://.\{-\}\)\=$','','') : ''
21792182
if rev ==# ''
21802183
let expanded = s:buffer().rev()
21812184
elseif rev ==# ':'
@@ -2218,7 +2221,7 @@ function! s:Browse(bang,line1,count,...) abort
22182221
endif
22192222
endif
22202223

2221-
if a:0 && join(a:000, ' ') =~# '@[[:alnum:]_-]*\%(://.\{-\}\)\=$'
2224+
if a:0 && join(a:000, ' ') =~# '@[[:alnum:]_-]\+\%(://.\{-\}\)\=$'
22222225
let remote = matchstr(join(a:000, ' '),'@\zs[[:alnum:]_-]\+\%(://.\{-\}\)\=$')
22232226
elseif path =~# '^\.git/refs/remotes/.'
22242227
let remote = matchstr(path,'^\.git/refs/remotes/\zs[^/]\+')
@@ -2319,27 +2322,21 @@ function! s:github_url(opts, ...) abort
23192322
return root . '/commits/' . branch
23202323
endif
23212324
elseif path =~# '^\.git/refs/tags/'
2322-
return root . '/releases/tag/' . matchstr(path,'[^/]\+$')
2323-
elseif path =~# '^\.git/refs/.'
2324-
return root . '/commits/' . matchstr(path,'[^/]\+$')
2325+
return root . '/releases/tag/' . path[15:-1]
2326+
elseif path =~# '^\.git/refs/remotes/[^/]\+/.'
2327+
return root . '/commits/' . matchstr(path,'remotes/[^/]\+/\zs.*')
23252328
elseif path =~# '.git/\%(config$\|hooks\>\)'
23262329
return root . '/admin'
23272330
elseif path =~# '^\.git\>'
23282331
return root
23292332
endif
2330-
if a:opts.revision =~# '^[[:alnum:]._-]\+:'
2331-
let commit = matchstr(a:opts.revision,'^[^:]*')
2332-
elseif a:opts.commit =~# '^\d\=$'
2333-
let local = matchstr(a:opts.repo.head_ref(),'\<refs/heads/\zs.*')
2334-
let commit = a:opts.repo.git_chomp('config','branch.'.local.'.merge')[11:-1]
2335-
if commit ==# ''
2336-
let commit = local
2337-
endif
2333+
if a:opts.commit =~# '^\d\=$'
2334+
let commit = a:opts.repo.rev_parse('HEAD')
23382335
else
23392336
let commit = a:opts.commit
23402337
endif
2341-
if a:opts.type == 'tree'
2342-
let url = s:sub(root . '/tree/' . commit . '/' . path,'/$','')
2338+
if get(a:opts, 'type', '') ==# 'tree' || a:opts.path =~# '/$'
2339+
let url = substitute(root . '/tree/' . commit . '/' . path, '/$', '', 'g')
23432340
elseif a:opts.type == 'blob'
23442341
let url = root . '/blob/' . commit . '/' . path
23452342
if get(a:opts, 'line2') && a:opts.line1 == a:opts.line2
@@ -2372,10 +2369,8 @@ function! s:instaweb_url(opts) abort
23722369
endif
23732370
let url .= ';h=' . a:opts.repo.rev_parse(a:opts.commit . (a:opts.path == '' ? '' : ':' . a:opts.path))
23742371
else
2375-
if a:opts.type ==# 'blob'
2376-
let tmp = tempname()
2377-
silent execute 'write !'.a:opts.repo.git_command('hash-object','-w','--stdin').' > '.tmp
2378-
let url .= ';h=' . readfile(tmp)[0]
2372+
if a:opts.type ==# 'blob' && empty(a:opts.commit)
2373+
let url .= ';h='.a:opts.repo.git_chomp('hash-object', '-w', a:opts.path)
23792374
else
23802375
try
23812376
let url .= ';h=' . a:opts.repo.rev_parse((a:opts.commit == '' ? 'HEAD' : ':' . a:opts.commit) . ':' . a:opts.path)
@@ -2855,7 +2850,7 @@ function! s:cfile() abort
28552850
elseif getline('.') =~# '^[+-]' && search('^@@ -\d\+,\d\+ +\d\+,','bnW')
28562851
let type = getline('.')[0]
28572852
let lnum = line('.') - 1
2858-
let offset = -1
2853+
let offset = 0
28592854
while getline(lnum) !~# '^@@ -\d\+,\d\+ +\d\+,'
28602855
if getline(lnum) =~# '^[ '.type.']'
28612856
let offset += 1

‎sources_non_forked/vim-go/README.md

+23-20
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ disabled/enabled easily.
4646

4747
## Install
4848

49-
Vim-go follows the standard runtime path structure, so I highly recommend to use
50-
a common and well known plugin manager to install vim-go. Do not use vim-go with
51-
other Go oriented vim plugins. For Pathogen just clone the repo. For other plugin managers
52-
add the appropriate lines and execute the plugin's install command.
49+
Vim-go follows the standard runtime path structure, so I highly recommend to
50+
use a common and well known plugin manager to install vim-go. Do not use vim-go
51+
with other Go oriented vim plugins. For Pathogen just clone the repo. For other
52+
plugin managers add the appropriate lines and execute the plugin's install
53+
command.
5354

5455
* [Pathogen](https://github.com/tpope/vim-pathogen)
5556
* `git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go`
@@ -64,8 +65,9 @@ Please be sure all necessary binaries are installed (such as `gocode`, `godef`,
6465
`goimports`, etc.). You can easily install them with the included
6566
`:GoInstallBinaries` command. If invoked, all necessary binaries will be
6667
automatically downloaded and installed to your `$GOBIN` environment (if not set
67-
it will use `$GOPATH/bin`). Note that this command requires `git` for fetching the individual Go
68-
packages. Additionally, use `:GoUpdateBinaries` to update the installed binaries.
68+
it will use `$GOPATH/bin`). Note that this command requires `git` for fetching
69+
the individual Go packages. Additionally, use `:GoUpdateBinaries` to update the
70+
installed binaries.
6971

7072
### Optional
7173

@@ -156,19 +158,6 @@ More `<Plug>` mappings can be seen with `:he go-mappings`. Also these are just
156158
recommendations, you are free to create more advanced mappings or functions
157159
based on `:he go-commands`.
158160

159-
### Location list navigation
160-
161-
All commands support collecting and displaying errors in Vim's location
162-
list.
163-
164-
Quickly navigate through these location lists with `:lne` for next error and `:lp`
165-
for previous. You can also bind these to keys, for example:
166-
167-
```vim
168-
map <C-n> :lne<CR>
169-
map <C-m> :lp<CR>
170-
```
171-
172161
## Settings
173162
Below are some settings you might find useful. For the full list see `:he go-settings`.
174163

@@ -214,7 +203,21 @@ let g:go_bin_path = expand("~/.gotools")
214203
let g:go_bin_path = "/home/fatih/.mypath" "or give absolute path
215204
```
216205

217-
## Using with Syntastic
206+
### Location list navigation
207+
208+
All commands support collecting and displaying errors in Vim's location
209+
list.
210+
211+
Quickly navigate through these location lists with `:lne` for next error and `:lp`
212+
for previous. You can also bind these to keys, for example:
213+
214+
```vim
215+
map <C-n> :lne<CR>
216+
map <C-m> :lp<CR>
217+
```
218+
219+
220+
### Using with Syntastic
218221
Sometimes when using both `vim-go` and `syntastic` Vim will start lagging while saving and opening
219222
files. The following fixes this:
220223

0 commit comments

Comments
 (0)