Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Windows Way #91

Open
airstrike opened this issue Jan 8, 2020 · 7 comments
Open

The Windows Way #91

airstrike opened this issue Jan 8, 2020 · 7 comments

Comments

@airstrike
Copy link

airstrike commented Jan 8, 2020

:!taskkill.exe /f /im vim.exe

@TZubiri
Copy link

TZubiri commented Jan 8, 2020

Damn, windows api is cleaner than linux.That's much better than ps into grep into awk into kill

@TZubiri
Copy link

TZubiri commented Jan 8, 2020

Oh, nevermind

pkill vim

#72

@jdebp
Copy link

jdebp commented Jan 8, 2020

NAK. Does not employ the for command. Or Powershell.

@mupi2k
Copy link

mupi2k commented Jan 9, 2020

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...

@TZubiri
Copy link

TZubiri commented Jan 9, 2020 via email

@mupi2k
Copy link

mupi2k commented Jan 9, 2020

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...

@TZubiri
Copy link

TZubiri commented Jan 9, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants