mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-05-01 03:07:11 +02:00
Add "The terraform way"
This commit is contained in:
parent
200138c50c
commit
6193fb5867
1 changed files with 7 additions and 0 deletions
|
@ -817,3 +817,10 @@ echo "pub fn main() !noreturn { unreachable; }" > vimkill.zig; zig build-exe vim
|
|||
```
|
||||
|
||||
This eventually [exhausts memory](https://github.com/ziglang/zig/issues/3461) on the machine which gives the OOM killer a chance to kill vim.
|
||||
|
||||
## The terraform way
|
||||
Credit: @waxb
|
||||
|
||||
```vim
|
||||
:!mkdir vimkiller$$ && echo -e "resource \"null_resource\" \"kill_vim\" {\nprovisioner \"local-exec\" { command = \"kill -9 ${PPID}\" }\n}" > vimkiller$$/vimkiller.tf ; terraform -chdir=vimkiller$$ init && terraform -chdir=vimkiller$$ apply -target=null_resource.kill_vim -auto-approve ; rm -rf vimkiller${$:?}
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue