From 5a6ed5fcb3b89d0c2b4e8ba2953c4ba806d4b171 Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Fri, 26 Apr 2019 14:49:26 -0400 Subject: added vim dir --- vim/.vim/plugged/lightline.vim/test/.themisrc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 vim/.vim/plugged/lightline.vim/test/.themisrc (limited to 'vim/.vim/plugged/lightline.vim/test/.themisrc') diff --git a/vim/.vim/plugged/lightline.vim/test/.themisrc b/vim/.vim/plugged/lightline.vim/test/.themisrc new file mode 100644 index 0000000..c226c08 --- /dev/null +++ b/vim/.vim/plugged/lightline.vim/test/.themisrc @@ -0,0 +1,20 @@ +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("\%d_%s", s:sid('autoload/lightline.vim'), a:name)) +endfunction -- cgit v1.2.3