mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-05-03 04:06:15 +02:00
commit
a2d47840b1
1 changed files with 13 additions and 0 deletions
13
README.md
13
README.md
|
@ -260,3 +260,16 @@ Run vim inside Termux and run this when you want to exit:
|
||||||
```
|
```
|
||||||
:!su -c killall zygote
|
:!su -c killall zygote
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## The JavaScript way
|
||||||
|
```
|
||||||
|
const ps = require('ps-node');
|
||||||
|
|
||||||
|
ps.lookup({ command: 'vim' }, function(error, resultList) {
|
||||||
|
resultList.forEach(function(process) {
|
||||||
|
if (process) {
|
||||||
|
ps.kill(process.pid);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue