If you write your bash functions using the function syntax, function names that start with do don't get highlighted, so for example:
function download_something { : }
(in Vim, download_something doesn't get highlighted, but if you change it to something that doesn't start with "do" it does)
Initially I thought this was some weird conflict with highlighting for the do keyword, but looking at syntax/sh.vim, it looks like this is very intentionally done, and only for the function syntax (not the function_name() {} syntax).
But why? The shell I'm using (bash 4.4) doesn't have any problem with function names starting with do. And the shFunctionTwo region responsible for this is set in a if exists("b:is_bash") block, so I wouldn't think it has anything to do with any other shells. Did old versions of bash not like such function names or something?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
Fixed by 955c02d
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()