1

For more than a year, I have unmap <C-X> in my .vimrc because I can't figure out where this mapping comes from.

I used verbose map <C-X> as suggested in another topic, it returns

v <C-X> "*d

and I don't know what that means. There is nothing that maps <C-X> to anything in my .vimrc, yet that unmap command doesn't even give an error, which means it's mapped somehow.

guntbert
  • 1,245
  • 1
  • 13
  • 27
  • 2
    It very well could be in some startup file in VIMRUNTIME, but I’d expect to have the file shown with verbose. I have the same problem with <BS> in visual mode mapped to "-d – D. Ben Knoble Mar 18 '20 at 15:24
  • Does :20verbose map <C-x> help? Otherwise try starting Vim as vim -V20log and searching the log file for <c-x>. – Martin Tournoij Mar 20 '20 at 09:38
  • @MartinTournoij :20verbose map <C-X> result is same as verbose map <C-X> in this case. Second method you suggested just opened an empty file. I should also note that my vim acts in same way on my secondary computer too(which uses same .vimrc). – KeyboardDestroyer Mar 20 '20 at 19:50
  • Maybe -V[N]{fileame} doesn't work for older versions? See :help starting.txt. Otherwise you can always use: https://vi.stackexchange.com/q/2003/51 – Martin Tournoij Mar 24 '20 at 07:31
  • @MartinTournoij I opened vim in debug mode, ignoring .vimrc and it was fine, not sure what's the problem but I'll go through my .vimrc, see what activates that mapping. Thank you very much! – KeyboardDestroyer Mar 25 '20 at 16:07
  • I get these entries (among others) via :verb map and the same when running gvim -u NONE -U NONE -N except the first is now v <C-X> "*d. s <C-X> "*d v <C-Del> "*d v <S-Del> "*d v <C-Insert> "*y v <S-Insert> "-d"*P n <S-Insert> "*P Despite verbose the source is not listed. I've searched through all files in program dir and the only instance of these mappings is in mswin.vim. But according to the comments in the file it needs to be explicitly sourced, and :scriptnames does not show the file being sourced. I logged via -u NONE -U NONE -N -V9log.txt and got nothing helped. I d – Tom Feb 25 '24 at 01:51
  • @Tom, I have figured out from where these mapping are coming see my answer. Let me know if that help :-) – Vivian De Smedt Feb 29 '24 at 10:42

1 Answers1

0

These are actually the dos standard mapping. They are defined in the source code of Vim (src/map.c).

More information with :help dos-standard-mappings

Vivian De Smedt
  • 16,336
  • 3
  • 18
  • 37