Hi,
I found a problem in vim's sh syntax. Here is the snippet:
if true; then
ls -l # inside if
fi
ls -l # outside if
The two '-l' are in different syntax group. The one inside if is shTestOpr and
the other one is shOption. I have tested this using version 172 and the latest
version 177, both gave the same result. I attach a screenshot of this, and
there are clearly two different syntax highlighting.
I use the following function to detect the syntax group of the text under the
cursor.
function DetectSyntaxGroup()
for id in synstack(line('.'), col('.'))
echo synIDattr(id, 'name')
endfor
endfunction
noremap <F10> :call DetectSyntaxGroup()<CR>
Thanks.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.