mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-05-01 11:17:12 +02:00
Update README.md
This commit is contained in:
parent
276b1f7188
commit
30d3b74541
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue