mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-05-02 19:56:14 +02:00
Merge pull request #11 from zerovectorspace/execute_buffer
Use vim against itself with @
This commit is contained in:
commit
230a394cfb
1 changed files with 7 additions and 1 deletions
|
@ -88,6 +88,12 @@ In `vi`:
|
|||
:!sudo reboot
|
||||
```
|
||||
|
||||
## The using vim against itself way (executing the buffer)
|
||||
Open Vim to empty buffer and type:
|
||||
```
|
||||
i:qa!<esc>:@"<cr>
|
||||
```
|
||||
|
||||
## The AppleScript way
|
||||
Credit: @dbalatero
|
||||
In Mac terminal `vi`:
|
||||
|
@ -98,7 +104,7 @@ 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
|
||||
## The Mac Activity Monitor way
|
||||
Credit: @dbalatero
|
||||
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue