mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-05-01 11:17:12 +02:00
Merge 6b41b3a4c1
into 110da1c9df
This commit is contained in:
commit
2f27ff0ae7
1 changed files with 8 additions and 0 deletions
|
@ -857,3 +857,11 @@ Based on the C way of @dbalatero
|
||||||
```vim
|
```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"
|
: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
|
||||||
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue