A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learnbyexample.github.io/mini/vim-prank/ below:

Vim prank: alias vim='vim -y'

Poster created using Canva

While going through :h vim-arguments for my Vim Reference Guide ebook, I came across the -y option:

Easy mode. Implied for evim and eview. Starts with 'insertmode' set and behaves like a click-and-type editor. This sources the script $VIMRUNTIME/evim.vim. Mappings are set up to work like most click-and-type editors, see evim-keys. The GUI is started when available.

It was so weird to use. Copy and paste works with Ctrl+c and Ctrl+v respectively. Text can be selected with mouse and typing new text overwrites this selected portion. Esc key doesn't work (gasp!), so I couldn't quit until I used the window buttons. Later I tried and found that Ctrl+o works, which would then allow you to use :q as usual.

So, if you want to prank a Vim user:

alias vim='vim -y'

I didn't expect such a good response on /r/vim/ and twitter for this "easy" feature. So, decided to write this mini blog post as well. Also, I got to know a few more ways to escape this madness from the /r/vim/ sub:

One hint: If you want to go to Normal mode to be able to type a sequence of commands, use CTRL-L. https://vimhelp.org/starting.txt.html#evim-keys

Use &LTc-\>&LTc-n> See :h CTRL-\_CTRL-N

Update

So, this post reached front page on Hacker News! Plenty of interesting comments and got to know about novim-mode plugin (which aims to make Vim behave more like a 'normal' editor).

I also found an old discussion on /r/vim/ discussing ways to trick a Vim user.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4