mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-06-17 18:11:56 +02:00
Merge 45cb06b6c8
into 110da1c9df
This commit is contained in:
commit
5f5a74f906
1 changed files with 14 additions and 0 deletions
14
README.md
14
README.md
|
@ -34,6 +34,20 @@ Credit: @kpumuk
|
||||||
:!grep -P "PPid:\t(\d+)" /proc/$$/status | cut -f2 | xargs kill -9
|
:!grep -P "PPid:\t(\d+)" /proc/$$/status | cut -f2 | xargs kill -9
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## The `xdotool` way
|
||||||
|
|
||||||
|
Credit: @x3rAx
|
||||||
|
|
||||||
|
Why type complex commands yourself when `xdotool` can **do the hard work for you**?<sup>*</sup>
|
||||||
|
|
||||||
|
```bash
|
||||||
|
:!(xdotool type ":e /tmp/exit.vim"; xdotool key KP_Enter; xdotool type "ggiquitall\!"; xdotool key KP_Enter; xdotool key Escape; xdotool type ":w"; xdotool key KP_Enter; xdotool type ":source /tmp/exit.vim"; xdotool key KP_Enter)&
|
||||||
|
```
|
||||||
|
|
||||||
|
**¯\\\_(ツ)\_/¯**
|
||||||
|
|
||||||
|
<sup>*</sup> Needs `xdotool` to be installed
|
||||||
|
|
||||||
## The first contact way
|
## The first contact way
|
||||||
Credit: @caseyjohnellis
|
Credit: @caseyjohnellis
|
||||||

|

|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue