The “How to exit vim” repository contains many “weird tricks” for exiting Vim.

the easiest way


:!ps axuw | grep vim | grep -v grep | awk '{print $2}' | xargs kill -9

The Python way


:py3 import os,signal;from subprocess import check_output;os.kill(int(check_output(["pidof","vim"]).decode
('utf-8')),signal.SIGTERM)

Pure Perl way


:!perl -e 'while(</proc/*>){open($f, "$_/cmdline"); kill 9, substr($_,6) if <$f> =~ m|^vim\x00| }'  

Mac Terminal

Press +q > Click Terminate

#exit #vim #Home #Documentation #Downloads

How to exit vim Home, Documentation and Downloads

Leave a Comment

Your email address will not be published. Required fields are marked *