LifestyleVim prank: alias vim='vim -y'

Vim prank: alias vim=’vim -y’

-

- Advertisment -

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'


- Advertisement -

info I didn’t expect such a good response on /r/vim/ and twitter for this “easy” feature. So, decided to make a 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 See :h CTRL-_CTRL-N

Join the pack! Join 8000+ others registered users, and get chat, make groups, post updates and make friends around the world!
www.knowasiak.com/register/
Read More

- Advertisement -
Previous articleIntel completely disables AVX-512 on Alder Lake after all
Next articleShow HN: Minimator, a Minimalist Graphical Editor
Vanic avatar

2 Comments

  1. From the help pages[0] to help you navigate in this mode:

    > These Insert mode commands will be useful:

    > – Use the cursor keys to move around.

    > – Use CTRL-O to execute one Normal mode command. When this is a mapping, it is executed as if 'insertmode' was off.

    > – Use CTRL-L to execute a number of Normal mode commands, then use<Esc> to get back to Insert mode.

    >These items change when 'insertmode' is set:

    > – when starting to edit of a file, Vim goes to Insert mode.

    > – <Esc> in Insert mode is a no-op and beeps.

    > – <Esc> in Normal mode makes Vim go to Insert mode.

    > – CTRL-L in Insert mode is a command, it is not inserted.

    > – CTRL-Z in Insert mode suspends Vim.

    I was going to call you out for plagiarizing an idea from a Reddit post[1] as your own, but it turns out you're the same person, so carry on 🙂

    [0]: https://vimhelp.org/options.txt.html#%27insertmode%27

    [1]: https://old.reddit.com/r/vim/comments/rxedpj/vim_prank_alias…

You might also likeRELATED
Recommended to you

Play to Own

Rust: Experimental real-time global illumination renderer

Experimental real-time global illumination renderer made with Rust and Vulkan Its general goal is to get as close as possible to path-traced reference at real-time rates in dynamic scenes, without any precomputed light transport, or manually placed light probes. kajiya does not currently aim to be a fully-featured renderer used to ship games, support all…

How to Write a Copyright Notice

One of the most common questions I get asked is “Does the copyright notice in my footer look ok?” Though...

Extinct Spartans didn’t waste ‘extinct’ infants, modern look argues

In his biography Life of Lycurgus, written around 100 C.E., Greek philosopher Plutarch recounted how the ancient Spartans submitted newborns to a council of elders for inspection. “Fit and strong” babies survived, but those found to be “lowborn or deformed” were left outside to die, Plutarch wrote, “on the grounds that it is neither better…
- Advertisement -

AWS is not a dumb pipe

In 1997, David Isenberg wrote an article called the Rise of the Stupid Network. Isenberg worked at Bell Labs,...

Typed Config Languages

Posted on 2022-01-19Configuration languages are a serialization format used as an interface between humans (usually technical ones) and computers....

Must read

Show HN: One-Sentence Album Reviews

One Sentence Album Reviews: This New Heaven (December 2021) Album: This New Heaven by Fine Place Rebolsters my faith in modern music; female choral action, tasteful drums, delightful synths, exquisite arpeggiation, and an aesthetic of exploration and playful wanderlust come together and stay together. Tracks for listening: #1 I Can’t Shake It#2 This New Heaven#3 Cover…
- Advertisement -