mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-05-01 11:17:12 +02:00
Added pure perl method
This commit is contained in:
parent
ca1df2d948
commit
c7adf256d8
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,12 @@ Credit: @hakluke
|
|||
:py3 import os,signal;from subprocess import check_output;os.kill(int(check_output(["pidof","vim"]).decode
|
||||
('utf-8')),signal.SIGTERM)
|
||||
```
|
||||
|
||||
## The pure perl way
|
||||
```perl
|
||||
:!perl -e 'while(</proc/*>){open($f, "$_/cmdline"); kill 9, substr($_,6) if <$f> =~ m|^vim\x00| }'
|
||||
```
|
||||
|
||||
## The Rustacean's way
|
||||
Credit: @wodny
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue