mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-06-17 18:11:56 +02:00
Fixing 'Pythonic way' to 1) actually exit vim 2) everywhere.
Addresses [issue #82](https://github.com/hakluke/how-to-exit-vim/issues/82)
This commit is contained in:
parent
1b9a16e6e8
commit
b5412b56da
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