Skip to content

comments inside parentheses mess up the syntax coloring of shell script #487

@LLyaudet

Description

@LLyaudet

Hi,

I've found the following bug with syntax coloring of shell scripts in vi and vim.
(I just tested it on Ubuntu with
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:32)
Rustines incluses : 1-52
)
If you add comments outside parenthesis, it works fine.
But if you add comments inside parenthesis, or worse comments with quotes, the syntax coloring is totally messed up.

I join a sample shell script to demonstrate the bug.
(I had to rename the file from .sh to .txt because GitHub can't upload .sh...)

Best regards,
Laurent Lyaudet

PS : I reported this bug a year ago on launchpad but it wasn't the right place:
https://bugs.launchpad.net/ubuntu/+source/vim/+bug/1380110
I'll update the status of the bug there once it is solved.

testBugVim .txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions