Update README.md

This commit is contained in:
Luke Stephens (hakluke) 2019-09-26 03:44:21 +10:00 committed by GitHub
parent 276b1f7188
commit 30d3b74541
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,3 +21,11 @@ Credit: @hakluke
```
:!find /proc -name status | while read file; do echo "$file: "; cat $file | grep vim; done | grep -B1 vim | grep -v Name | while read line; do sed 's/^\/proc\///g' | sed 's/\/.*//g'; done | xargs kill -9
```
## The pythonic way
Credit: @hakluke
```
:py3 import os,signal;from subprocess import check_output;os.kill(int(check_output(["pidof","vim"]).decode
('utf-8')),signal.SIGTERM)
```