aboutsummaryrefslogtreecommitdiff
path: root/Common/vim/autoload/plug.vim
diff options
context:
space:
mode:
authorJakob Stendahl <jakob.stendahl@outlook.com>2022-06-05 12:54:07 +0200
committerJakob Stendahl <jakob.stendahl@outlook.com>2022-06-05 12:54:07 +0200
commit0447c58e759df165269ffe9182398881e650d923 (patch)
tree8b96a359c385fe4dab5dbbfb5aa72992dbc5be24 /Common/vim/autoload/plug.vim
parent8457757e7133a093cbf62985488a7e5d46d41f89 (diff)
downloaddotfiles-0447c58e759df165269ffe9182398881e650d923.tar.gz
dotfiles-0447c58e759df165269ffe9182398881e650d923.zip
Some things
Diffstat (limited to 'Common/vim/autoload/plug.vim')
-rw-r--r--Common/vim/autoload/plug.vim10
1 files changed, 6 insertions, 4 deletions
diff --git a/Common/vim/autoload/plug.vim b/Common/vim/autoload/plug.vim
index b6e4cbf..e664b26 100644
--- a/Common/vim/autoload/plug.vim
+++ b/Common/vim/autoload/plug.vim
@@ -242,6 +242,8 @@ function! plug#begin(...)
let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p'))
elseif exists('g:plug_home')
let home = s:path(g:plug_home)
+ elseif has('nvim')
+ let home = stdpath('data') . '/plugged'
elseif !empty(&rtp)
let home = s:path(split(&rtp, ',')[0]) . '/plugged'
else
@@ -350,7 +352,7 @@ function! plug#end()
endif
let lod = { 'ft': {}, 'map': {}, 'cmd': {} }
- if exists('g:did_load_filetypes')
+ if get(g:, 'did_load_filetypes', 0)
filetype off
endif
for name in g:plugs_order
@@ -405,7 +407,7 @@ function! plug#end()
for [map, names] in items(lod.map)
for [mode, map_prefix, key_prefix] in
- \ [['i', '<C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
+ \ [['i', '<C-\><C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
execute printf(
\ '%snoremap <silent> %s %s:<C-U>call <SID>lod_map(%s, %s, %s, "%s")<CR>',
\ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix)
@@ -2764,9 +2766,9 @@ function! s:snapshot(force, ...) abort
1
let anchor = line('$') - 3
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)
- 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)
call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha))
redraw