how-to-exit-vim
how-to-exit-vim copied to clipboard
The Windows Way
:!taskkill.exe /f /im vim.exe
Damn, windows api is cleaner than linux.That's much better than ps into grep into awk into kill
Oh, nevermind
pkill vim
https://github.com/hakluke/how-to-exit-vim/issues/72
NAK. Does not employ the for
command. Or Powershell.
Damn, windows api is cleaner than linux.That's much better than ps into grep into awk into kill
In fairness, piping grep to awk is almost always redundant. You could do it without the pipes by using $() as in :! for i in $(grep -l vim$ /proc/*/comm | cut -d/ -f3); do kill $i; done
This also has the advantage of killing ALL your vim instances, including the ones you suspended using the 'suspend' method...
I'd rather shutdown my computer than come up with that command.
On another note, the true windows way is Ctrl Alt Del to kill the vim process. Ahhhh GUIs for sysadmins
El jue., 9 de ene. de 2020 15:28, Michael Porter [email protected] escribió:
Damn, windows api is cleaner than linux.That's much better than ps into grep into awk into kill
In fairness, piping grep to awk is almost always redundant. You could do it without the pipes by using $() as in :! for i in $(grep -l vim$ /proc/*/comm | cut -d/ -f3); do kill $i; done This also has the advantage of killing ALL your vim instances, including the ones you suspended using the 'suspend' method...
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hakluke/how-to-exit-vim/issues/91?email_source=notifications&email_token=ACD5F4YVSRLBI7AXHYNLLH3Q45UEDA5CNFSM4KEOYZ22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIRJDPI#issuecomment-572690877, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD5F43N3YAMRS2SGBIJUT3Q45UEDANCNFSM4KEOYZ2Q .
I'd rather shutdown my computer than come up with that command.
my command is pretty dang simple compared to some of the suggested methods...and cleaner than all the pipes (though I did have to pipe inside the $() you could do away with the pipes entirely by using pgrep, but at that point :! pgrep vim | xargs kill -9
is simpler. I was just trying to help you avoid pipes, since that was the core of your objection...
Oh, I appreciate the effort. it's just that a subprocess and a for loop add even more complexity.
El jue., 9 de ene. de 2020 17:00, Michael Porter [email protected] escribió:
I'd rather shutdown my computer than come up with that command.
my command is pretty dang simple compared to some of the suggested methods...and cleaner than all the pipes (though I did have to pipe inside the $() you could do away with the pipes entirely by using pgrep, but at that point :! pgrep vim | xargs kill -9 is simpler. I was just trying to help you avoid pipes, since that was the core of your objection...
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hakluke/how-to-exit-vim/issues/91?email_source=notifications&email_token=ACD5F43F3BV37FAAUAXKHVTQ45647A5CNFSM4KEOYZ22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIRSWYY#issuecomment-572730211, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD5F44DVOOMW6H7YWU2XKLQ45647ANCNFSM4KEOYZ2Q .