Hi,
I've sent this email to the maintainer of sh.vim but got an error so I came
here for help.
Here is my test code snippet:
#!/bin/sh
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 think they should all be in shOption group. I have
a screenshot as an attachment, which clearly we can see that they have
different syntax highlighting.
I use the following function to detect the syntax group to which the text under
the cursor belongs.
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.