Add "The xdotool way"

Sorry for the late PR, have been very busy with my studies since I posted #138
This commit is contained in:
Björn Richter 2020-10-23 10:57:52 +02:00 committed by GitHub
parent 1b9a16e6e8
commit 824ce6b097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,6 +34,18 @@ Credit: @kpumuk
:!grep -P "PPid:\t(\d+)" /proc/$$/status | cut -f2 | xargs kill -9
```
## The `xdotool` way
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
Credit: @caseyjohnellis
![Jeffrey Way](assets/first-contact-way.png)