1. Steve Losh
  2. stevelosh
  3. Issues
Issue #31 new

content/blog/2011/09/writing-vim-plugins.html: noremap

Alex Efros
created an issue

… you must always, always, always use the noremap forms of the various map commands.

While this is true in most cases, there are also rare cases when this is wrong - sometimes you wanna map your keys to current user's mapping of some keys, not their default operations.

Example1: http://code.google.com/p/vim-plugin-ruscmd/source/browse/plugin/ruscmd.vim#24 This plugin make keys work in same way when keyboard switched to Russian.

Example2: http://code.google.com/p/vim-plugin-viewdoc/source/browse/plugin/viewdoc.vim#91 Here plugin wanna define shortcut for another keys, and if user have redefined them, then let it be so. Moreover, original keys already redefined by same plugin few lines above, so *noremap won't work correctly at all here.

So, you may wanna update your article to make it sound less categorically.

Comments (1)

  1. Log in to comment