Errors with navigation key mappings #2

redcapital opened this Issue Apr 6, 2011 · 1 comment


None yet

2 participants


If you have these mappings already defined in ~/.vimrc:

nnoremap j gj
nnoremap k gk

When executing VimroomToggle Vim complains about already defined mappings.

Error detected while processing function <SNR>73_VimroomToggle:
line 66:
E227: mapping already exists for <80>ku
line 67:
E227: mapping already exists for <80>kd
line 68:
E227: mapping already exists for k
line 69:
E227: mapping already exists for j

and then everything works ok. I tried to comment out lines defining mappings in plugin code and then errors disappeared.

Vim 7.3
Vimroom latest cloned from github (last commit date: January 02, 2011)

mikewest commented Oct 8, 2011

Sorry I haven't looked at this yet. I'll take a look tonight. It should be pretty simple to fix.

@mikewest mikewest added a commit that referenced this issue Oct 8, 2011
@mikewest Adding `g:vimroom_navigational_keys` option.
Fixing issue #2: If navigational keys were already mapped, VimroomToggle
would throw an error due to the `<unique>` flag on the mappings. I've
now wrapped those in a try/catch block to grab the error, and provided
an option for the mappings that you can turn off if you've already
mapped the keys to your liking.
@mikewest mikewest closed this Oct 8, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment