Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions plugin/double-tap.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 "\<C-U>"
else
Expand Down