Monday, October 21, 2013

Vimscript - how to make menu/selection similar to `z=` and `g`

Hello fellow Vim users!
I began learning vim script from the most excellent resource: http://learnvimscriptthehardway.stevelosh.com/

I noticed 2 things "vim can do", but I don't know how to re-use for my scripts:

1. when the cursor is on a spelling error, you can press `z=` to get a list of possible corrections. Is there a way I can get that behavior and use it for other things?
Naturally, I wouldn't use that for spell correction - but for let's say a choosing an option from a long list.

2. when using ctags with vim, you can press g<Ctrl-]> to get a (colored) "menu" with a list of matching tags and a prompt to jump to selected tag (just a note - the menu and prompt is shown only if there's more matches for the current tag).
Now, the same as above - is there a way to get this exact menu/prompt for other scripts and other uses?

I couldn't find anything useful on google for this - I think I don't know the right terms.
But a pointer to a help section or a related link would be most useful!

Thanks

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment