add new plugin and update vimplug
This commit is contained in:
parent
53784924ec
commit
fda3468e06
|
@ -1,4 +1,3 @@
|
||||||
" obtained from https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
||||||
" vim-plug: Vim plugin manager
|
" vim-plug: Vim plugin manager
|
||||||
" ============================
|
" ============================
|
||||||
"
|
"
|
||||||
|
@ -353,7 +352,7 @@ function! plug#end()
|
||||||
endif
|
endif
|
||||||
let lod = { 'ft': {}, 'map': {}, 'cmd': {} }
|
let lod = { 'ft': {}, 'map': {}, 'cmd': {} }
|
||||||
|
|
||||||
if exists('g:did_load_filetypes')
|
if get(g:, 'did_load_filetypes', 0)
|
||||||
filetype off
|
filetype off
|
||||||
endif
|
endif
|
||||||
for name in g:plugs_order
|
for name in g:plugs_order
|
||||||
|
@ -2622,26 +2621,34 @@ function! s:preview_commit()
|
||||||
|
|
||||||
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}')
|
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}')
|
||||||
if empty(sha)
|
if empty(sha)
|
||||||
return
|
let name = matchstr(getline('.'), '^- \zs[^:]*\ze:$')
|
||||||
|
if empty(name)
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
let title = 'HEAD@{1}..'
|
||||||
|
let command = 'git diff --no-color HEAD@{1}'
|
||||||
|
else
|
||||||
|
let title = sha
|
||||||
|
let command = 'git show --no-color --pretty=medium '.sha
|
||||||
|
let name = s:find_name(line('.'))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let name = s:find_name(line('.'))
|
|
||||||
if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir)
|
if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir)
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists('g:plug_pwindow') && !s:is_preview_window_open()
|
if exists('g:plug_pwindow') && !s:is_preview_window_open()
|
||||||
execute g:plug_pwindow
|
execute g:plug_pwindow
|
||||||
execute 'e' sha
|
execute 'e' title
|
||||||
else
|
else
|
||||||
execute 'pedit' sha
|
execute 'pedit' title
|
||||||
wincmd P
|
wincmd P
|
||||||
endif
|
endif
|
||||||
setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable
|
setlocal previewwindow filetype=git buftype=nofile bufhidden=wipe nobuflisted modifiable
|
||||||
let batchfile = ''
|
let batchfile = ''
|
||||||
try
|
try
|
||||||
let [sh, shellcmdflag, shrd] = s:chsh(1)
|
let [sh, shellcmdflag, shrd] = s:chsh(1)
|
||||||
let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha
|
let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && '.command
|
||||||
if s:is_win
|
if s:is_win
|
||||||
let [batchfile, cmd] = s:batchfile(cmd)
|
let [batchfile, cmd] = s:batchfile(cmd)
|
||||||
endif
|
endif
|
||||||
|
@ -2767,9 +2774,9 @@ function! s:snapshot(force, ...) abort
|
||||||
1
|
1
|
||||||
let anchor = line('$') - 3
|
let anchor = line('$') - 3
|
||||||
let names = sort(keys(filter(copy(g:plugs),
|
let names = sort(keys(filter(copy(g:plugs),
|
||||||
\'has_key(v:val, "uri") && !has_key(v:val, "commit") && isdirectory(v:val.dir)')))
|
\'has_key(v:val, "uri") && isdirectory(v:val.dir)')))
|
||||||
for name in reverse(names)
|
for name in reverse(names)
|
||||||
let sha = s:git_revision(g:plugs[name].dir)
|
let sha = has_key(g:plugs[name], 'commit') ? g:plugs[name].commit : s:git_revision(g:plugs[name].dir)
|
||||||
if !empty(sha)
|
if !empty(sha)
|
||||||
call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha))
|
call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha))
|
||||||
redraw
|
redraw
|
||||||
|
|
|
@ -7,6 +7,7 @@ Plug 'tridactyl/vim-tridactyl'
|
||||||
Plug 'chrisbra/csv.vim'
|
Plug 'chrisbra/csv.vim'
|
||||||
Plug 'trapd00r/vimpoint'
|
Plug 'trapd00r/vimpoint'
|
||||||
Plug 'vimwiki/vimwiki'
|
Plug 'vimwiki/vimwiki'
|
||||||
|
Plug 'itchyny/calendar.vim'
|
||||||
cal plug#end()
|
cal plug#end()
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue