Vim Prank

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'

info 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 <c-\><c-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.