New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors with navigation key mappings #2

Closed
redcapital opened this Issue Apr 6, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@redcapital

redcapital commented Apr 6, 2011

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.

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

@mikewest

This comment has been minimized.

Owner

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 added a commit that referenced this issue Oct 8, 2011

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