2

I'm trying to debug a mapping of the key Y.

:verbose map gives the following snippet:

...
noxW           * repmo#SelfKey('W', 'B')
    Last set from ~/.dotfiles/vim/.config/vim/vimrc line 446
n  Y           * y$
o  [%            <Plug>(MatchitOperationMultiBackward)
    Last set from /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim line 75
...

All the other lines seem to include Last set from. Why doesn't Y?

How do I find out the source of Y mapping to y$?

Also, what's the * about? Searching :help map for \* didn't turn up anything.

I'm using neovim 0.6.0.

1
  • 2
    The answer to the meaning of * is found under :h map-listing ("indicates that it is not remappable"). Add this to your answer if you want.
    – B Layer
    Commented Dec 8, 2021 at 9:59

1 Answer 1

1

Looking at :help Y we read:

Mapped to "y$" by default. |default-mappings|

Reading there, we find:

Nvim creates the following default mappings at |startup|. You can disable any
of these in your config by simply removing the mapping, e.g. ":unmap Y".

    nnoremap Y y$
    nnoremap <C-L> <Cmd>nohlsearch<Bar>diffupdate<CR><C-L>
    inoremap <C-U> <C-G>u<C-U>
    inoremap <C-W> <C-G>u<C-W>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.