GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Books
  • Mini
  • Tips
  • Tags
  • About
  • learnbyexample
  • Vim prank: alias vim='vim -y'

This view

  • Original page
  • New address

GeezerVison is showing learnbyexample.github.io — Vim prank: alias vim='vim -y'

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.

#vim

← Regexp gotcha 1: grouping common portions

Debug woes 2: unexpected array in replacement string →


📰 Use this link for the Atom feed.
✅ Follow me on Twitter, GitHub and Youtube for interesting tech nuggets.


You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.