2 " @Author: Thomas Link (mailto:micathom AT gmail com?subject=[vim])
3 " @Website: http://www.vim.org/account/profile.php?user_id=4037
4 " @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5 " @Created: 2007-11-15.
6 " @Last Change: 2007-11-16.
9 if &cp || exists("loaded_tlib_comments_autoload")
12 let loaded_tlib_comments_autoload = 1
17 " function! tlib#comments#Comments(?rx='')
18 function! tlib#comments#Comments(...)
24 let [m_0, m_key, m_val, m_val1, co0, co; rest] = matchlist(co, '^\([^:]*\):\(\(\\.\|[^,]*\)\+\)\(,\(.*\)$\|$\)')
25 " TLogVAR m_key, m_val, co
29 if empty(rx) || m_key =~ rx
30 let comments[m_key] = m_val
37 " function! tlib#comments#PartitionLine(line) "{{{3
38 " if !empty(&commentstring)
39 " let cs = '^\(\s*\)\('. printf(tlib#rx#Escape(&commentstring), '\)\(.\{-}\)\(') .'\)\(.*\)$'
40 " let ml = matchlist(a:line, cs)
45 " let [m_0, pre, open, line, close, post; rest] = ml
47 " let [m_0, pre, line; rest] = matchstr(a:line, '^\(\s*\)\(.*\)$')
48 " for [key, val] in tlib#comments#Comments()
52 " return {'pre': pre, 'open': open, 'line': line, 'close': close, 'post': post}