Is it possible to put vim comments in lines that include iabbrev, as in:

iabbrev hte the " common typo

As explained in :help 40.1 (SPECIAL CHARACTERS):

starts a new, empty command with a comment.  Example: 


So, you can use | in order to indicate the end of the abbreviation/mapping:

iabbrev hte the| " common typo
  • Do I have to put the vertical bar | right after the abbreviation?
    – Yossi Gil
    Jan 8 '16 at 12:27
  • Yes. Try copying the last line of the answer into your Vim command line.
    – mMontu
    Jan 8 '16 at 12:35


Not the answer you're looking for? Browse other questions tagged .