mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-05-01 03:07:11 +02:00
commit
3ebd352be3
1 changed files with 35 additions and 4 deletions
39
README.md
39
README.md
|
@ -668,7 +668,7 @@ echo "set modeline" >> .vimrc
|
||||||
## The Circuit Breaker Way
|
## The Circuit Breaker Way
|
||||||
Credit:@Tomcat-42
|
Credit:@Tomcat-42
|
||||||
|
|
||||||
1. Smoothly leave your computer
|
1. Leave your computer
|
||||||
2. Find the nearest electrical circuit breaker panel
|
2. Find the nearest electrical circuit breaker panel
|
||||||
3. Switch off and on the main breaker
|
3. Switch off and on the main breaker
|
||||||
4. Return to your computer
|
4. Return to your computer
|
||||||
|
@ -676,12 +676,43 @@ Credit:@Tomcat-42
|
||||||
|
|
||||||
**Note:** This approach prove itself ineffective against notebooks, desktops on a UPS or remote servers.
|
**Note:** This approach prove itself ineffective against notebooks, desktops on a UPS or remote servers.
|
||||||
|
|
||||||
## The Permanent Way
|
## The Ansible Way
|
||||||
Credit: @jofftiquez
|
Credit: @lpmi-13
|
||||||
|
|
||||||
***Quit software engineering for good.***
|
run vim.yml playbook with the following contents:
|
||||||
|
|
||||||
|
```
|
||||||
|
---
|
||||||
|
- hosts: vimbox
|
||||||
|
|
||||||
|
vars:
|
||||||
|
required_packages:
|
||||||
|
- vim
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: install python 2
|
||||||
|
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
|
||||||
|
|
||||||
|
- name: Update APT package cache
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: Run apt-get upgrade
|
||||||
|
apt: upgrade=safe
|
||||||
|
|
||||||
|
- name: Install required packages
|
||||||
|
apt: state=installed pkg={{ item }}
|
||||||
|
with_items: "{{ required_packages }}"
|
||||||
|
|
||||||
|
- name: Start Vim in the background.
|
||||||
|
shell: "(vim >/dev/null 2>&1 &)"
|
||||||
|
|
||||||
|
- name: Quit Vim.
|
||||||
|
shell: "(pkill vim)"
|
||||||
|
```
|
||||||
|
|
||||||
## The Stack Overflow Way
|
## The Stack Overflow Way
|
||||||
Credit: @cobaltblu27
|
Credit: @cobaltblu27
|
||||||
|
|
||||||
*Yeah exiting vim is really frustrating sometimes. You should definately try using Neovim. It's fast, has terminal emulator, and also supports plugin that will help you exit vim.*
|
*Yeah exiting vim is really frustrating sometimes. You should definately try using Neovim. It's fast, has terminal emulator, and also supports plugin that will help you exit vim.*
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue