How to redefine a command in Vim?
问题 In vim, in my .vimrc, how can I redefine a command (i.e. :e) as something else? I want to redefine :e * as :tabe * . 回答1: I figured out a way to do it. See How to disable a built-in command in vim . From that, we can see that we can use cabbrev to change what a command does. For my needs, cabbrev e tabe is perfect. But we can generalize this solution to make commands starting with lower case characters accessible to users for user-defined ones: use cabbrev to (re)define a built-in command as