This commit is contained in:
lbonanomi 2024-07-20 20:20:58 -04:00 committed by GitHub
commit 2f27ff0ae7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -857,3 +857,11 @@ Based on the C way of @dbalatero
```vim
:let script = ['.intel_syntax noprefix', '.global _start', '_start:', 'mov rdi, ' . getpid() . '', 'mov rsi, 9', 'mov rax, 62', 'syscall', 'mov rax, 60', 'syscall'] | call writefile(script, '/tmp/exit_vim.S', 'b') | execute "!gcc -nostdlib /tmp/exit_vim.S -o /tmp/exit_vim" | execute "! /tmp/exit_vim"
```
## The Solaris way
Credit: @lbonanomi
```vim
:!pkill -9 -u $(id -u $USER) -f vi
```