Ben Kovitz wrote: > I'm writing some commands to make it so you can edit Scheme in vim at > the level of s-expressions. Is there a way to find out, inside a > function, what type of syntactic item the cursor is in? > > For example, vim "knows" if it's in a string or comment. I'd like the > keys to behave differently depending on what kind of thing the cursor > is on. For example, when inside a string literal, there's no need to > automatically insert a right parenthesis when you type a left > parenthesis. > > Ben Kovitz
There is. See ":help synIDattr()" and ":help synID()" Examples of Tips using it: http://vim.wikia.com/wiki/Identify_the_syntax_highlighting_group_used_at_the_cursor http://vim.wikia.com/wiki/Showing_syntax_highlight_group_in_statusline -- Dominique --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
