Loading ...
Sorry, an error occurred while loading the content.

vim.sh highlighting bug in vim-60au

Expand Messages
  • Randy Hron
    Thanks for making a beautiful editor. This is probably old. To see it: #!/bin/bash function amiroot { if ((UID != 0)) then echo Only root can run
    Message 1 of 1 , Sep 3, 2001
    • 0 Attachment
      Thanks for making a beautiful editor.

      This is probably old.

      To see it:
      #!/bin/bash
      function amiroot {
      if ((UID != 0))
      then echo "Only root can run $command" >&2
      exit 1
      fi
      }

      The "fi" and closing "}" appear in reverse video.

      To not see it:
      #!/bin/bash
      function amiroot {
      if (( UID != 0 ))
      then echo "Only root can run $command" >&2
      exit 1
      fi
      }

      Putting space around (( )) makes the syntax highlighting appear correct.

      bash and ksh don't need space around (( )) for integer comparisons.

      Adding the line below after line 146 in sh.vim makes the "fi" and "}" not in
      reverse video. However, the )) color doesn't match ((. So the closure of
      ((UID==0)), still isn't quite perfect.

      syn region shArithmetic matchgroup=shArithRegion start="((" end="))"
      contains=ALLBUT,@shCommandSubList2
    Your message has been successfully submitted and would be delivered to recipients shortly.