ducttape icon indicating copy to clipboard operation
ducttape copied to clipboard

Syntax highlighting error: /* comments */ versus bash globs /*

Open jhclark opened this issue 12 years ago • 5 comments

I just noticed a syntax highlighting issue that might be a case against /* comments */.

Consider the following bash glob:

tar -xvzf file.tgz dir/*
ls file.tgz

Under current vim/emacs syntax highlighting, "ls file.tgz" and the rest of the file is highlighted. This is because in ducttape syntax, /* denotes the beginning of a comment. However, this code is in a bash context. Yet, I'm not aware of any way of switching highlighting contexts in vim/emacs. Do you know if this exists? If not, is this a reason to exclude such comments in ducttape?

At the moment, this issue is intended as a discussion, not an action item.

jhclark avatar Jun 01 '12 19:06 jhclark

I've encountered this problem as well. This is indeed very annoying.

One temporary fix would be to disable /* */ as a highlightable item in the vim/emacs setup. So, ducttape could continue processing multiline comments, but they wouldn't be highlighted.

dowobeha avatar Jun 01 '12 19:06 dowobeha

Should we just kill off /* */ entirely?

jhclark avatar Jun 25 '12 20:06 jhclark

I don't know. I kind of like having it. Hmmm...

dowobeha avatar Jun 25 '12 20:06 dowobeha

@jhclark, I propose we remove this issue from the v0.2 milestone. The highlighting is no longer an issue in emacs.

dowobeha avatar Jun 26 '12 19:06 dowobeha

OK, postponed.

jhclark avatar Jun 26 '12 19:06 jhclark