Friday, October 21, 2011

Syntax highlighting Problem in for Bash

I was bitten by the old
unexpected EOF while looking for matching `"'
error in bash. Where you start a comment some where in the middle of
your script and forget to place a quote mark at the end. After
searching through the text I could not find any string that matched
this criteria. It was only when I loaded the script into SciTE that I
could see that this text was the problem

<script>
# Syntax.........: libraryCheck [-test] {executable}
# Parameters ....: executable - an Executable and Linkable Formated
file
: -test : just do the test but don't fail on error
# Return values .: 0 on success, exits if libraries not found

</script>

Even though the third line appears as executable text to Bash, to me
it looks like part of the comment in the other lines. Vim did not help
me here since it colors the line starting with the colon the same as
the line starting with the hash mark. In order to find the problem I
loaded the script into Scite.

Where as Scite treats lines starting with colons correctly and leaves
them colored like regular text, Vim colors them the same as comments
( those lines wich start with hash marks).

How can I change Vim's syntax coloring to treat lines starting with
colons differently from those starting with hash marks?

Thanks and Regards Tom Bodine

--
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

No comments: