简体   繁体   中英

can i force vim to exit with 0 status

I'm running the default vim on OSX. (sierra, if it matters). If I search for a non-existent string at any time during my session, vim exits with a non-zero exit code. Normally I don't care, but with svn commits or resolving conflicts this is a problem. I know :cq forces vim to exit with an error. Is there the opposite function? Some command that forces vim to exit with a status of 0?

Vim was always doing the right thing - it was correctly exiting with a 0 error code. My actual problem turned out to be that subversion (svn) was not honoring the EDITOR environment variable, as documented. It was actually using 'vi' and it was returning the bad exit code. Setting SVN_EDITOR to vim fixed my longstanding problem with commits and conflict resolution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM