Tip #643: Disable built-in command
tip karma |
Rating 8/4, Viewed by 316
|
created: |
|
January 26, 2004 12:41 |
|
complexity: |
|
intermediate |
author: |
|
Alfvaen |
|
as of Vim: |
|
5.7 |
If there's a built-in key command in vim that you just can't stand, find annoying, and/or often hit by accident(for me it's "K", with ">" a close second), then you can disable it using ":map". You can't use ":unmap", as you might think. Instead, you can map it to nothing, like:
:map K <Nop>
(<Nop> is not the "Nop" key on your keyboards, but literal letters inside literal pointy brackets.)
Of course, you can always
:unmap K
if you start doing C programming and want to instantly "man" things under the cursor again.
<<Windows: Get K to not display a DOS box that needs closing |
restoring indent for '#' >>
Additional Notes
|