diff --git a/plugin/double-tap.vim b/plugin/double-tap.vim index 1b76f2b..ac03361 100644 --- a/plugin/double-tap.vim +++ b/plugin/double-tap.vim @@ -35,7 +35,7 @@ endif let g:loaded_doubletap = 1 " }}} -let s:pattern = '\([b,]\|^\):\zs\([^,]\+\)' " This patterns finds the wanted +let s:pattern = '\v(,[^sme][0-9]*|,|^):\zs[^,]+' " This patterns finds the wanted " item in 'comments' let s:commStart = {} " dict to hold the comment starters using @@ -50,9 +50,10 @@ function! s:Detect_empty_comment() endif " Captures the comment starter if necessary; only once per filetype if !has_key(s:commStart, &ft) - let s:commStart[&ft] = matchstr(&comments, s:pattern) + let s:commStart[&ft] = join(matchlist(&comments, s:pattern),'q') endif let line = getline('.') + echom s:commStart[&ft] if s:commStart[&ft] != '' && line =~ '^\s*\V'. s:commStart[&ft] . '\m\s*$' return "\" else