Commit Graph

11 Commits

Author SHA1 Message Date
Øystein Walle
5b150bda13 Handle that the comment marker can contain regex
In the case of e.g. C Double-tap will correctly detect * as a potential
character a comment can start with. But * has special meaning in regular
expressions and in the case of Vim will trigger an error if not used
correctly.

Protect what Double-tap find by surrounding it in \V...\m. Thanks to
@utrack for the idea.

Fixes #5.
2015-09-10 00:55:15 +02:00
Øystein Walle
0ceb8558c3 Accept a b flag in 'comments'
The default ftplugin/python.vim uses the b flag. I am unsure what other
flags are needed to be added to the pattern. From my reading of :help
'comments' this should be enough. I guess I'll just have to add them as
issues appear.
2015-05-10 16:51:16 +02:00
Øystein Walle
009764508b Fix since non-empty strings aren't considered true 2013-01-09 23:37:22 +01:00
Øystein Walle
b18ef39102 Add <silent> to mapping.
Thanks to emma-dev for the suggestion :)
2012-11-30 17:29:02 +01:00
Øystein Walle
3534df9cfd Deliver <CR> if no comment starter was found
Thanks to xckpd7 at #vim :)
2012-11-26 17:39:35 +01:00
Øystein Walle
392b0b1415 Make extracting the comment leader cleaner 2012-10-05 00:01:56 +02:00
Øystein Walle
2c41ed4a76 Remove <expr> from the recursive mapping 2012-03-20 20:30:44 +01:00
Øystein Walle
fa7702e47e Merged patch from graywh and fixed an inoremap error 2012-03-20 20:13:39 +01:00
Øystein Walle
1029648e8e Insert missing logical operator. Fix breaking on empty filetype. 2012-03-20 19:26:57 +01:00
Will Gray
a497687e48 Use <plug> so the function can be script-local
Also provides something nice for users to map to when they don't want to use <CR>
2012-03-20 12:52:51 -05:00
Øystein Walle
c241f63368 Initial commit 2012-03-20 18:31:37 +01:00