Search code examples
vimkeyboard-shortcuts

How to make shortcut for :tabnew, :tabn, :tabp?


In vim, I'd like to shorten :tabnew to :tn, :tabp to :th, :tabn to :tl somewhere in my .vimrc. Any idea how I would remap commands like this?


Solution

  • Use cabbrev:

    ca tn tabnew
    ca th tabp
    ca tl tabn