]> git.madduck.net Git - etc/vim.git/blob - test/vimrc

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add `:lclose` after `:Toc` to fix test failure
[etc/vim.git] / test / vimrc
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
10 function! Markdown_GetScriptID(fname) abort
11     let a:snlist = ''
12     redir => a:snlist
13     silent! scriptnames
14     redir END
15     let a:mx = '^\s*\(\d\+\):\s*\(.*\)$'
16     for a:line in split(a:snlist, "\n")
17         if stridx(a:line, a:fname) >= 0
18             return substitute(a:line, a:mx, '\1', '')
19         endif
20     endfor
21 endfunction
22 function! Markdown_GetFunc(fname, funcname) abort
23     return function('<SNR>' . Markdown_GetScriptID(a:fname) . '_' . a:funcname)
24 endfunction