vim flags a for loop error depending on file extension in the 'for' line?
Found something really weird.
Writing a 'for' loop in vim, with #!/bin/bash as first line, so vim knows this is a script and turns on colour highlighting, brace matching etc.
# **********
count=0
for file in *.tif ; do
# an attempt at ocr'ing a page
let "count = count + 1"
done
but vim highlights the 'done' in red as being an error.
Removing *ONE* '"' from the 'let' line clears the 'error'...Huh?
So the 'error' is triggered above that point....
Changing the file extension from '*.tif' to '*.tiff' clears the error.
So, does anyone know *WHY* this happens? How/why does *vim* parse text for the file extensions? Is 'tif' a keyword for an extension? If so, what are the others?
I find this most intrigueing (although a work-around is easy!)
|