mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-20 01:03:06 +02:00
syntax: Support knowledge-like headers in fold text captions
This commit is contained in:
parent
d16ea12c09
commit
3b7f4cf6b0
1 changed files with 2 additions and 0 deletions
|
@ -38,6 +38,8 @@ function! TaskwikiFoldText()
|
|||
let line = getline(v:foldstart)
|
||||
let main_text = substitute(line, '^\s*', repeat(' ',indent(v:foldstart)), '')
|
||||
let short_text = substitute(main_text, '|[^=]* =', '=', '')
|
||||
let short_text = substitute(short_text, '@[^=]* =', '=', '')
|
||||
let short_text = substitute(short_text, ' @[A-Za-z0-9]\+', '', '')
|
||||
let fold_len = v:foldend - v:foldstart + 1
|
||||
let len_text = ' ['.fold_len.'] '
|
||||
return short_text.len_text.repeat(' ', 500)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue