Hi All -
I'm having an issue with code folding in BASH that I've been unsuccessful at fixing. It's not a show stopper, but REALLY REALLY annoying... With a few thousand lines of code it becomes difficult to use. Hopefully someone here has already solved this.
There are a few commands in BASH that use the pound sign (#) in them. This is also the comment character. Dumb, I know. For example, the following throws off code folding:
As soon as I use the "#" on the array variable to get the count, it throws off code folding. There are other instances with variable substitution that use pound signs and throw it off as well. I've attached before/after images.
Has anyone successfully overcome this without losing any other code folding/syntax highlighting function?
Thanks in advance!
I'm having an issue with code folding in BASH that I've been unsuccessful at fixing. It's not a show stopper, but REALLY REALLY annoying... With a few thousand lines of code it becomes difficult to use. Hopefully someone here has already solved this.
There are a few commands in BASH that use the pound sign (#) in them. This is also the comment character. Dumb, I know. For example, the following throws off code folding:
Code: Select all
function foo {
my_array=(1 2 3 4)
for number in ${my_array[@]}; do
echo "The number is ${number}."
done
echo "There are ${#my_array[@]} numbers in the array."
echo "Now you can see the code folding just go borked."
}
Has anyone successfully overcome this without losing any other code folding/syntax highlighting function?
Thanks in advance!
- Code folding with the pound in place.
- Code folding without the pound in place.