1

I was wondering if it is possible to execute two commands with one cabbrev. I want to execute:

:set columns=170
:wincmd =

I tried

cnoreabbrev c2 :set columns=170 | :wincmd =

But it did not work.

joon
  • 3,899
  • 1
  • 40
  • 53

1 Answers1

1

Try this:

cnoreabbrev c2 :set columns=170 <BAR> :wincmd =
kev
  • 155,172
  • 47
  • 273
  • 272
  • You need to be careful with `cnoreabbrev` as they will expand in other command modes that do not make sense. e.g. `/c2` If this is the route you want to go I suggest you do something like: http://stackoverflow.com/a/7515418/438329 – Peter Rincker Aug 21 '12 at 17:22