Markdown Vim Mode
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
627 B

set nocompatible
set rtp+=../
set rtp+=../build/tabular/
set rtp+=../build/vader.vim/
filetype on
filetype plugin on
filetype indent on
syntax on
function! Markdown_GetScriptID(fname) abort
let a:snlist = ''
redir => a:snlist
silent! scriptnames
redir END
let a:mx = '^\s*\(\d\+\):\s*\(.*\)$'
for a:line in split(a:snlist, "\n")
if stridx(a:line, a:fname) >= 0
return substitute(a:line, a:mx, '\1', '')
endif
endfor
endfunction
function! Markdown_GetFunc(fname, funcname) abort
return function('<SNR>' . Markdown_GetScriptID(a:fname) . '_' . a:funcname)
endfunction