On 2008-11-30, anhnmncb wrote:
>
> As title, I want to make a function for foldtext like this:
>
> function MY_TeX_BiBFoldText()
> let line = getline(v:foldstart, v:foldend)
> let matchlinea = match(line, '^\s*author.*{.*}.*') + 1
> let matchlinet = match(line, '^\s*title.*{.*}.*') + 1
> let matcha = substitute(getline(matchlinea), '^.*{\(.*\)}*.*$', '\1', 'g')
> let matcht = substitute(getline(matchlinet), '^.*{\(.*\)}*.*$', '\1', 'g')
> let matched = "title: " . matcht . " author: " . matcha
> return v:folddashes . matched
> endfunction
>
> So the folding will show the string "matched", but I find that v:foldstart and
> v:foldend have the same value in foldings, so all my foldings show the same
> string, why?
>
Isn't my description clear? If so, let me know please.
--
Regards,
anhnmncb
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---