Thursday, October 23, 2014

placeholder mapping

Does vim provide a placeholder key mapping construct, i.e. one that cannot be invoked from the keyboard?

Something like

nnoremap <cannot_be_pressed>[KEY] [STOCK_MAPPING]

It's probably not clear why I'm asking. I was trying to add ]c [c mappings for non-diff files without stepping on the existing diff mapping. Most approaches I tried ran into various issues with global mapping conflicts. The solution that worked for me was to map the stock behavior to a function key (which I don't use) and set up a function where I could execute normal one or the other. This is not bad (and can be extended) but it seems like there ought to be a behavior something like <Plug> or <Sid> for this situation.

--
--
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/d/optout.

No comments: