mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-05-02 11:46:16 +02:00
Add activity monitor way of exiting Vim
This commit is contained in:
parent
cf11761fa5
commit
bc072fdd8a
1 changed files with 6 additions and 0 deletions
|
@ -92,3 +92,9 @@ Replace "iTerm" with your terminal application of choice:
|
|||
:let script="activate application \"iTerm\"\ntell application \"System Events\"\n keystroke \":\"\n keystroke \"q\"\n keystroke \"a\"\n keystroke \"!\"\n key code 36\nend tell" | call writefile(split(script, "\n", 1), '/tmp/exit-vim.scpt', 'b') | !osascript /tmp/exit-vim.scpt
|
||||
```
|
||||
|
||||
# The Mac Activity Monitor way
|
||||
Credit: @dbalatero
|
||||
|
||||
```
|
||||
let script="activate application \"Activity Monitor\"\ntell application \"System Events\"\n\tkeystroke \"f\" using {option down, command down}\n\tkeystroke \"vim\"\n\n\ttell process \"Activity Monitor\"\n\t\ttell outline 1 of scroll area 1 of window 1\n\t\t\tselect row 1\n\n\t\t\tkeystroke \"q\" using {option down, command down}\n\t\t\tkey code 36\n\t\tend tell\n\tend tell\nend tell\n" | call writefile(split(script, "\n", 1), '/tmp/exit-vim.scpt', 'b') | !osascript /tmp/exit-vim.scpt
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue