mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-08-06 10:08:54 +02:00
Merge b5412b56da
into 110da1c9df
This commit is contained in:
commit
15e4494a48
1 changed files with 2 additions and 3 deletions
|
@ -46,11 +46,10 @@ python -c "from os import system; system('killall -9 vim')"
|
||||||
````
|
````
|
||||||
|
|
||||||
## The pythonic way
|
## The pythonic way
|
||||||
Credit: @hakluke
|
Credit: @Resisty
|
||||||
|
|
||||||
```python
|
```python
|
||||||
:py3 import os,signal;from subprocess import check_output;os.kill(int(check_output(["pidof","vim"]).decode
|
:py3 import os,signal;from subprocess import check_output;[os.kill(int(i),signal.SIGTERM) for i in check_output(['pgrep', 'vim']).strip().decode('utf-8').split('\n')]
|
||||||
('utf-8')),signal.SIGTERM)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## The pure perl way
|
## The pure perl way
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue