Deliver <CR> if no comment starter was found
Thanks to xckpd7 at #vim :)
This commit is contained in:
parent
392b0b1415
commit
3534df9cfd
@ -53,7 +53,7 @@ function! s:Detect_empty_comment()
|
|||||||
let s:commStart[&ft] = matchstr(&comments, s:pattern)
|
let s:commStart[&ft] = matchstr(&comments, s:pattern)
|
||||||
endif
|
endif
|
||||||
let line = getline('.')
|
let line = getline('.')
|
||||||
if line =~ '^\s*'. s:commStart[&ft] . '\s*$'
|
if s:commStart[&ft] && line =~ '^\s*'. s:commStart[&ft] . '\s*$'
|
||||||
return "\<C-U>"
|
return "\<C-U>"
|
||||||
else
|
else
|
||||||
return "\<CR>"
|
return "\<CR>"
|
||||||
|
Loading…
Reference in New Issue
Block a user