On 11/19/11 07:32, Andy Wokula wrote:
Am 19.11.2011 13:27, schrieb Tim Chase:
On 11/19/11 05:05, Eric Smith wrote:
How do I find the next occurance of a pattern which is not
preceeded in the same line by a comment token? The identity of
the comment token should be derived from the current
filetype.
For the below, I'm
assuming you can access that information in the variable
"b:comment_leader"
I think in place of b:comment_leader, you can (rather) almost count on
'cms'/'commentstring':
I'm not sure how reliable that is either, as I just opened a .py
file and the 'cms' was set to "/*%s*/" which isn't a valid
comment leader for Python.
Additionally, some C-like languages support blockwise comments
(such as "/* ... */" or even "#ifdef 0 ... #endif") in addition
to line-wise comments (using "//"), and it sounds like the OP
wants to be able to insert "//" for C-like languages, "#" for
many scripting-type languages (bash, Python, Perl perhaps, etc?),
or a double-quote for Vim scripts, etc.
Nothing in my Vim seems to set those upon FT detection, though
that may be because (1) I'm running 7.2 which comes stock on
Debian Stable or (2) I don't have some aspect of ft-detection
turned on.
-tim
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php