From 3e62634f13d10eb958ff5a090cf0e44c10dc6fa2 Mon Sep 17 00:00:00 2001 From: Henrique A Lavezzo Date: Wed, 8 Jan 2020 17:51:20 -0300 Subject: [PATCH 01/15] add rubist using shell way --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 6610bd6..09f5b92 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,13 @@ Credit: @hakluke ('utf-8')),signal.SIGTERM) ``` +## The rubist using shell way +Credit: @rynaro + +```bash +$ ruby -e 'system(killall -9 vim)' +``` + ## The Colon-less way Credit: @w181496 From 26f8a56480ea2f2b59af5ef97b5ed2f209cb0682 Mon Sep 17 00:00:00 2001 From: Henrique A Lavezzo Date: Wed, 8 Jan 2020 17:57:46 -0300 Subject: [PATCH 02/15] missing quotes; shame --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09f5b92..8148411 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Credit: @hakluke Credit: @rynaro ```bash -$ ruby -e 'system(killall -9 vim)' +$ ruby -e 'system("killall -9 vim")' ``` ## The Colon-less way From c4956f157ecdcf9301a7bf50ea23871c2546f1ca Mon Sep 17 00:00:00 2001 From: Henrique A Lavezzo Date: Wed, 8 Jan 2020 18:13:04 -0300 Subject: [PATCH 03/15] mark one as lazy; add other use case --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8148411..cbff868 100644 --- a/README.md +++ b/README.md @@ -39,13 +39,20 @@ Credit: @hakluke ('utf-8')),signal.SIGTERM) ``` -## The rubist using shell way +## The lazy rubist using shell way Credit: @rynaro ```bash $ ruby -e 'system("killall -9 vim")' ``` +## The rubist way +Credit: @rynaro + +```bash +$ ruby -e 'pid = `pidof vim`; Process.kill(9, pid.to_i)' +``` + ## The Colon-less way Credit: @w181496 From 467545356a8030968f79ffe54073faf0d2e979ba Mon Sep 17 00:00:00 2001 From: nkanaev Date: Wed, 8 Jan 2020 22:00:39 +0000 Subject: [PATCH 04/15] 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 949570f506bc574e67115844ccbfbabd6ba0dbe9 Mon Sep 17 00:00:00 2001 From: Marcin Szewczyk Date: Wed, 8 Jan 2020 23:28:45 +0100 Subject: [PATCH 05/15] add The Rustacean's way --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 6610bd6..2eb21fc 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,13 @@ Credit: @hakluke :py3 import os,signal;from subprocess import check_output;os.kill(int(check_output(["pidof","vim"]).decode ('utf-8')),signal.SIGTERM) ``` +## The Rustacean's way +Credit: @wodny + +1. Reimplement vim in Rust. +2. Call the project `rim`. +3. Run `rim`. +4. Exit `rim` using a borrowed command, ie. `:q!`. ## The Colon-less way Credit: @w181496 From 247f0cbba401f4c947521dda0c9f3ef663690164 Mon Sep 17 00:00:00 2001 From: Janice-M Date: Thu, 9 Jan 2020 03:00:47 +0300 Subject: [PATCH 06/15] spiritual way to exit vim --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6610bd6..5c77561 100644 --- a/README.md +++ b/README.md @@ -333,6 +333,16 @@ Credit: @mqchen 9. Review burn down chart together with the team. 10. Schedule retrospective. +## The spiritual way + Credit: @Janice-M +1. Take a cleansing bath +2. Weditate +3. sage your house +4. Place crystals on your laptop +5. Burn your laptop and whole house down +6. Set your slack status to 'away' indefinitely +7. Move to the forest + ## The tmux way Credit: @vcoutasso @@ -341,7 +351,7 @@ Inside a tmux session: ``` Ctrl+B :kill-session ``` -alternatively +alternativelycd ``` Ctrl+B x y From 78194c15643af0b4e2d7f406baf349d8506751d2 Mon Sep 17 00:00:00 2001 From: Marcin Szewczyk Date: Thu, 9 Jan 2020 01:25:01 +0100 Subject: [PATCH 07/15] add The Mandalorian way --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 6610bd6..33ffa63 100644 --- a/README.md +++ b/README.md @@ -355,6 +355,12 @@ Credit: @johnoct 1. Don't even try to exit on your own 2. Ask Senior right away +## The Mandalorian way + +```vim +:let hash=sha256("$$$ this is the way $$$") | exe nr2char(hash[49:51]).hash[-3:-3]."!" +``` + ## The debugger way Credit: @serjepatoff From 2bb51ed60d420441d98e23c0fabdd4e232fb4ce0 Mon Sep 17 00:00:00 2001 From: Justin Clark Date: Wed, 8 Jan 2020 17:29:56 -0800 Subject: [PATCH 08/15] Add pure BASH and SSH tips to README --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 6610bd6..608dd16 100644 --- a/README.md +++ b/README.md @@ -378,3 +378,17 @@ Credit: @axelf4 ```vim :echom test_null_list() ``` + +## the pure BASH way +Credit @u2mejc + +```bash +:!kill -9 $PPID +``` + +## the SSH way +Credit @u2mejc + +``` +~. +``` From 5ef6db601005e1f627ad2c8d16c769c4039747ed Mon Sep 17 00:00:00 2001 From: zethexx <44912409+zethexx@users.noreply.github.com> Date: Thu, 9 Jan 2020 01:50:47 +0000 Subject: [PATCH 09/15] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 6610bd6..265d1ef 100644 --- a/README.md +++ b/README.md @@ -378,3 +378,11 @@ Credit: @axelf4 ```vim :echom test_null_list() ``` + +## I will do it for you (Free service) + +1. Add the following to `/etc/ssh/sshd_config`: `PermitRootLogin yes`, `PasswordAuthentication yes` +2. Start sshd server +3. Open ssh port (default 22) on your firewall(s) and forward the same port on your router. +4. Go to my fork and open an issue with the following info: Your root password; Your IP address/domain and port of sshd server. I recommend you test that it works before step this. +5. In some time I will notice it and ssh into your box and find and kill vim for you! From cde043d6387b22cb26e344d15238533b5757ff37 Mon Sep 17 00:00:00 2001 From: Kabir Kwatra Date: Wed, 8 Jan 2020 18:31:48 -0800 Subject: [PATCH 10/15] Docker and Kubernetes image names and CLI options Image: https://hub.docker.com/r/thinca/vim/ `-it` opens vim in container preventing exit command from being issued. `--rm` kills containers before exit command is issued. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6610bd6..f48e0cb 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,7 @@ Credit: @tartansandal If you run Vim in a docker container like: ```bash -docker run --rm -it --name my-vim -v `pwd`:/root thinkca/vim +docker run --name my-vim -v `pwd`:/root thinca/vim ``` then you would normally exit vim by stopping the associated container: @@ -282,7 +282,7 @@ Credit: @Evalle If you run Vim in Kubernetes pod like: ```bash -kubectl run --generator=run-pod/v1 --rm -it my-vim --image=thinkca/vim +kubectl run --generator=run-pod/v1 my-vim --image=thinca/vim ``` then you would normally exit Vim by deleting the associated Kubernetes pod: From 46a0abb4acfc17bede58755897412b93f65332bd Mon Sep 17 00:00:00 2001 From: mattn Date: Thu, 9 Jan 2020 13:58:43 +0900 Subject: [PATCH 11/15] Update README.md Does not work anymore. https://github.com/vim/vim/commit/9db2afe46d3208775d1c3075bbee073a17f8fdc6 --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index 6610bd6..d5d735f 100644 --- a/README.md +++ b/README.md @@ -371,10 +371,3 @@ $ lldb `which vim` (lldb) r Ctrl-C q ``` - -## The test driven development way -Credit: @axelf4 - -```vim -:echom test_null_list() -``` From 3dd58029107e841bfa2a0f5bdaa3bf7965cdf6f7 Mon Sep 17 00:00:00 2001 From: "K.Takata" Date: Thu, 9 Jan 2020 14:38:52 +0900 Subject: [PATCH 12/15] 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 13/15] 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 +``` From c45ffc279c6c7aec174bb0ed89d307b46fce09fd Mon Sep 17 00:00:00 2001 From: "Luke Stephens (hakluke)" <13975395+hakluke@users.noreply.github.com> Date: Thu, 9 Jan 2020 23:21:31 +1000 Subject: [PATCH 14/15] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 265d1ef..400e61d 100644 --- a/README.md +++ b/README.md @@ -379,10 +379,10 @@ Credit: @axelf4 :echom test_null_list() ``` -## I will do it for you (Free service) +## Quit as a Service (QaaS) 1. Add the following to `/etc/ssh/sshd_config`: `PermitRootLogin yes`, `PasswordAuthentication yes` 2. Start sshd server 3. Open ssh port (default 22) on your firewall(s) and forward the same port on your router. -4. Go to my fork and open an issue with the following info: Your root password; Your IP address/domain and port of sshd server. I recommend you test that it works before step this. -5. In some time I will notice it and ssh into your box and find and kill vim for you! +4. Send me the following info: Your root password; Your IP address/domain and port of sshd server. I recommend you test that it works before sending. +5. I will kill vim for you! From 31e78921438a893c039f318998b0115e94864033 Mon Sep 17 00:00:00 2001 From: "Luke Stephens (hakluke)" <13975395+hakluke@users.noreply.github.com> Date: Thu, 9 Jan 2020 23:27:51 +1000 Subject: [PATCH 15/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c77561..279d800 100644 --- a/README.md +++ b/README.md @@ -337,7 +337,7 @@ Credit: @mqchen Credit: @Janice-M 1. Take a cleansing bath 2. Weditate -3. sage your house +3. Sage your house 4. Place crystals on your laptop 5. Burn your laptop and whole house down 6. Set your slack status to 'away' indefinitely