There is a syntax highlighting bug in vim when using only one escaped double quote within double square brackets and the regex match operator Reproducible: Always Steps to Reproduce: 1. open (g)vim 2. put this into a document: #!/bin/bash [[ $a =~ \" ]] && echo something 3. Possibly save (and reopen) to activate bash syntax highlighting Actual Results: Everything after the escaped double quote is treated as if after an UNescaped double quote Expected Results: Escaped quote should be handled as such and not be treated as a regular double quote Error seems to be in /usr/share/vim/vim72/syntax/sh.vim but I neither have a clue of vim syntax highlighting language nor whether this is a Gentoo bug or a vim bug...
Confirmed on Gentoo x86 with app-editors/vim-7.2.303 and app-editors/vim-core-7.2.303. It also happens on a Debian system with version 7.1.314 of vim.
I just tested this with the latest vim (7.3.322) and this has been fixed sometime in the intervening years.
> I just tested this with the latest vim (7.3.322) and this has been fixed > sometime in the intervening years. Confirmed with vim 7.3.322 emerged with the ~x86 keyword for the test.