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

  1. set nocompatible
  2. set rtp+=../
  3. set rtp+=../build/tabular/
  4. set rtp+=../build/vader.vim/
  5. filetype on
  6. filetype plugin on
  7. filetype indent on
  8. syntax on
  9. function! Markdown_GetScriptID(fname) abort
  10. let a:snlist = ''
  11. redir => a:snlist
  12. silent! scriptnames
  13. redir END
  14. let a:mx = '^\s*\(\d\+\):\s*\(.*\)$'
  15. for a:line in split(a:snlist, "\n")
  16. if stridx(a:line, a:fname) >= 0
  17. return substitute(a:line, a:mx, '\1', '')
  18. endif
  19. endfor
  20. endfunction
  21. function! Markdown_GetFunc(fname, funcname) abort
  22. return function('<SNR>' . Markdown_GetScriptID(a:fname) . '_' . a:funcname)
  23. endfunction