mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-05-01 03:07:11 +02:00
Exit vim via Emacs
This commit is contained in:
parent
3b912c3be8
commit
563753a556
1 changed files with 7 additions and 0 deletions
|
@ -117,3 +117,10 @@ Credit: @dbalatero
|
|||
```
|
||||
:let script=['#define _POSIX_SOURCE', '#include <signal.h>', '', "int main() {", " kill(" . getpid() . ", SIGKILL);", ' return 0;', '}'] | call writefile(script, '/tmp/exit_vim.c', 'b') | execute "!gcc /tmp/exit_vim.c -o /tmp/exit_vim" | execute "! /tmp/exit_vim"
|
||||
```
|
||||
|
||||
## The Emacs way
|
||||
Credit: @dbalatero
|
||||
|
||||
```
|
||||
:let command='emacs --batch --eval=''(shell-command "kill -9 ' . getpid() . '")'' --kill' | execute "!" . command
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue