I am trying to create a bit of functionality that will only occur when the cursor is in double quotation marks in a ruby ββfile.
How to check if the cursor is in this syntax?
This will return the current syntax group.
function! SyntaxItem() return synIDattr(synID(line("."),col("."),1),"name") endfunction
From: http://vim.wikia.com/wiki/Showing_syntax_highlight_group_in_statuslineAlso see: http://vim.wikia.com/wiki/Identify_the_syntax_highlighting_group_used_at_the_cursor
Everything is built on the basis of fragments of functions that Andy gave you. After that, we can create more complex functions and commands.
This is what I did with my file map plugin . Here are a few usage examples:
NTN.