2

I want do disable change-to-lowercase key map in Vim. Specifically, the command mentioned here:

Visual select the text, then u for lowercase.

I find out from here that I can add :unmap u to .vimrc, but it will possibly disable undo command, which I don't want.

How can I disable u in visual selection mode?

HBat
  • 4,873
  • 4
  • 39
  • 56
  • The `:unmap` will unmap only user-defined mappings, never the builtin commands. See Peter Rincker's answer for the way to solve this – yolenoyer Mar 30 '18 at 14:12

1 Answers1

5

Use <nop>:

xnoremap u <nop>

May also be interested in:

xnoremap U <nop>
nnoremap gu <nop>
nnoremap gU <nop>

For more help see:

:h <Nop>
Peter Rincker
  • 43,539
  • 9
  • 74
  • 101