13

I have an alias bed="vim ~/.bashrc && . ~/.bashrc" in my .bashrc. Now every now and then I'd like to run bed but return the vim with an exit status 1 so the source command doesn't execute.

kub1x
  • 3,272
  • 37
  • 38

1 Answers1

20

Found the answer here : How to exit the Vim editor?

You can do :cq to exit with a non-zero exit code.

Ealhad
  • 1,912
  • 20
  • 27