2

I tried the following commands:

:abb sm Summary:\n
:abb sm Summary:\\n

but it didn't work, nothing escaped, I ended up with the long form instead of a break.

Is there a way to do that from ex mode? Is it something with one of those ^M characters? I can't remember how to do that.

5

Use <cr> instead of \n:

iabbrev sm Summary<cr>

You use generally use key notation in these cases, something you can find out more about by entering :h key-notation.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.