Reputation: 373
In vim, when I have a Bash function that ends with a Bash keyword, my vim highlighting starts highlighting it and assumes a new scope (if applicable):
values-for() {
...
}
^yellow "for" highlight
^syntax error highlight
But when I rename the "for" word to "for1" then those undesired highlights disappear.
How do I tell vim to ignore keywords like "for" when it is used as part of a function name?
Upvotes: 1
Views: 75
Reputation: 172510
$VIMRUNTIME/syntax/sh.vim
script (that ships with Vim 8.0.1358), version 172 from Oct 02, 2017 (assuming a proper #!/bin/bash
shebang, so that the syntax detects the Bash dialect).Upvotes: 1