Friday, December 23, 2016

Re: Is there a key map conflict in my Vim?

On Fri, Dec 23, 2016 at 2:22 AM, Zhe Lee <imlegendlzz@gmail.com> wrote:
> I use the two command below to map my `j` and `k`, the purpose of these command is that when the current line is too long, it will be wrapped in vim window, and you don't want to jump it when you press j or k. So ~
> nnoremap <expr> j v:count == 0 ? 'gj' : 'j'
> nnoremap <expr> k v:count == 0 ? 'gk' : 'k'
>
> It doesn't work when I enter vim, but it worked when I run the command
>
> `source $MYVIMRC`
>
> I check my vimrc file no key map conflict in it. It means that my plugin get some duplicated key map ?
>
> How to fix it ? I use gvim 8 on windows

After entering Vim, at a point where the mapping "doesn't work", type

:verbose map j
:verbose map k

If it answers "No mapping found" it means the mapping isn't known at
that point. Otherwise it will tell you what each of these keys is
mapped to, and by which script.


Best regards,
Tony.

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

Post a Comment