From 467545356a8030968f79ffe54073faf0d2e979ba Mon Sep 17 00:00:00 2001 From: nkanaev Date: Wed, 8 Jan 2020 22:00:39 +0000 Subject: [PATCH 1/3] the mac terminal way --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6610bd6..64baa3a 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,10 @@ 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 ``` +## The Mac Terminal way + +Press +q > Click `Terminate` + ## The Passive Way _**Walk away.**_ From 3dd58029107e841bfa2a0f5bdaa3bf7965cdf6f7 Mon Sep 17 00:00:00 2001 From: "K.Takata" Date: Thu, 9 Jan 2020 14:38:52 +0900 Subject: [PATCH 2/3] Add the libcall way --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 6610bd6..537336d 100644 --- a/README.md +++ b/README.md @@ -378,3 +378,16 @@ Credit: @axelf4 ```vim :echom test_null_list() ``` + +## The libcall way +Credit: @k-takata + +Windows +```vim +:call libcallnr('kernel32.dll', 'ExitProcess', 0) +``` + +Linux +```vim +:call libcallnr('libc.so.6', 'exit', 0) +``` From 29aa91f80fec05db3c486f79b15c45f2b3ac24a6 Mon Sep 17 00:00:00 2001 From: Sergey Bronnikov Date: Thu, 9 Jan 2020 09:48:23 +0300 Subject: [PATCH 3/3] Add canonical way --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 6610bd6..3a655b7 100644 --- a/README.md +++ b/README.md @@ -378,3 +378,10 @@ Credit: @axelf4 ```vim :echom test_null_list() ``` + +## The canonical way +Credit: @ligurio + +```vim +:!q +```