1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 09:35:01 +08:00

gitignore sources_non_forked_cache

This commit is contained in:
Wu Tingfeng
2022-11-21 23:06:50 +08:00
parent aff5c8f75a
commit 378168c979
1752 changed files with 208511 additions and 1 deletions

View File

@ -0,0 +1,24 @@
let s:sids = {}
function! s:sid(path) abort
if has_key(s:sids, a:path)
return s:sids[a:path]
endif
redir => scriptnames
silent! scriptnames
redir END
for line in split(scriptnames, '\n')
if line =~# a:path
let sid = matchstr(line, '\v^\s*\zs\d+\ze')
let s:sids[a:path] = sid
return sid
endif
endfor
endfunction
function! SID(name) abort
return function(printf("\<SNR>%d_%s", s:sid('autoload/lightline.vim'), a:name))
endfunction
filetype plugin on
call lightline#init()