Dealing with virtual indent inside a function
- I have an insert mapping for tab key that works right for existing
lines, but does not work right for a new line with 'virtual' indent
Normally, if it's in a mapping, it can be fixed by adding any key and
then backspace to erase it. I'm trying to do the same inside of a
function, and nothing I've tried works for me.
if getline('.') =~ '^\s*$'
call feedkeys("x", 't')
call feedkeys("\<bs>\<tab>", 'n') | return ''
This is at the top of snipmate's TriggerSnippet, by the way. I think
snipmate has some way of dealing with this but I don't know where it is
or how it works, so if someone can point this out, that might help.
Because I have another function that closes popup menu before triggering
snippet when tab key is pressed, snipmate's workaround for this does not
Any help appreciated!
You received this message from the "vim_use" 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