Reputation: 3572
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.
Upvotes: 15
Views: 2500
Reputation: 2240
Found the answer here : How do I exit Vim?
You can do :cq
to exit with a exit code 1 or :cq 2
to exit with exit code 2.
Upvotes: 24