Merge pull request #239 from mashuptwice/mashuptwice-patch-1

The layered Method
This commit is contained in:
Luke Stephens (hakluke) 2022-03-29 11:10:37 +10:00 committed by GitHub
commit 486c145a86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -252,6 +252,13 @@ Don't run this, it could break your computer.
:!echo b | sudo tee -a /proc/sysrq-trigger :!echo b | sudo tee -a /proc/sysrq-trigger
``` ```
## The layered Method
Credit: @mashuptwice
```
:!python -c "import os ; os.system(\"ssh localhost kill -9 $(pgrep vim >tmpfile && grep -P '\d+' tmpfile | sed 's/\(.*\)/\1/g' | cat && rm tmpfile) \")"
```
Bonus: still stuck if multiple vim instances are running
## The Abstinence Method ## The Abstinence Method
Credit: @ryanc Credit: @ryanc