.vim/autoload/plug.vim

changeset 976
1092ac0393ec
parent 947
dbec28d7a4f1
child 1000
218144b0d8fd
equal deleted inserted replaced
975:8aea1e8c4aa6 976:1092ac0393ec
240 if a:0 > 0 240 if a:0 > 0
241 let s:plug_home_org = a:1 241 let s:plug_home_org = a:1
242 let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p')) 242 let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p'))
243 elseif exists('g:plug_home') 243 elseif exists('g:plug_home')
244 let home = s:path(g:plug_home) 244 let home = s:path(g:plug_home)
245 elseif has('nvim')
246 let home = stdpath('data') . '/plugged'
245 elseif !empty(&rtp) 247 elseif !empty(&rtp)
246 let home = s:path(split(&rtp, ',')[0]) . '/plugged' 248 let home = s:path(split(&rtp, ',')[0]) . '/plugged'
247 else 249 else
248 return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.') 250 return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.')
249 endif 251 endif
403 \ cmd, string(cmd), string(names)) 405 \ cmd, string(cmd), string(names))
404 endfor 406 endfor
405 407
406 for [map, names] in items(lod.map) 408 for [map, names] in items(lod.map)
407 for [mode, map_prefix, key_prefix] in 409 for [mode, map_prefix, key_prefix] in
408 \ [['i', '<C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']] 410 \ [['i', '<C-\><C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
409 execute printf( 411 execute printf(
410 \ '%snoremap <silent> %s %s:<C-U>call <SID>lod_map(%s, %s, %s, "%s")<CR>', 412 \ '%snoremap <silent> %s %s:<C-U>call <SID>lod_map(%s, %s, %s, "%s")<CR>',
411 \ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix) 413 \ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix)
412 endfor 414 endfor
413 endfor 415 endfor

mercurial