[kwlug-disc] Vim highlighting problem (was: Capturing output in scripts)

Khalid Baheyeldin kb at 2bits.com
Wed Sep 3 15:28:55 EDT 2014


Using a pristine Ubuntu Server 14.04, I saw the messed up highlighting.
This means that my configuration for vim has nothing to do with it.

Here is a script that shows how it is messed up if someone wants to try it
out.

#!/bin/bash

# We create a function
do_someting() {
  # rsync with the following options:
  rsync -azRxW -e ssh blah blah
}

# Initialize files
> $LOG
> $IP_CURRENT
> $IP_HOME

(
  # This comment is not the right color. It is red.
  do_something

  # This is a comment with a ' in it. Messed up what is after it
) > $LOG 2>&1

# Another comment

# Another comment with a 'in it. Restores red color

And here is a screen shot from the pristine 14.04 install.

http://i.imgur.com/CiQamyB.png


-- 
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
For every complex problem, there is an answer that is clear, simple, and
wrong." -- H.L. Mencken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20140903/83c06b5c/attachment.htm>


More information about the kwlug-disc mailing list