Vim Tips Wiki

JAVH - Just another Vim Hacker

1,624pages on
this wiki
Add New Page
Talk0 Share
Tip 816 Printable Monobook Previous Next

created November 5, 2004 · complexity basic · author zzapper · version 5.7

Perl has its JAPH Just Another Perl Hacker (a short script that produces the output 'Just another Perl hacker' (Google for it)). I thought one day I'd try to something similar with Vim, the trick being to make it as obscure as possible:

vim -c ":%s%s*%Cyrnfr)fcbafbe[Oenz(Zbbyranne%|:%s)[[()])-)Ig|norm Vg?"

Here are some others, from various sources.

:s(.*(rekcaH iV rehtonA tsuJ(|t.|s).$)&&)|-s'.'s,\\(.\\)\\(.\\)\\(\\2.*\\),\\2\\3\\1,|'g|s=[^|]*|$=s,.,,=|d a|@a
gvim -c "exec \"normal itYNQ#v'Z#ABG#GUR#BAYL#BAR\"|%s/#/ /g|normal ggVGg?ggVG~"

So what's the point:

  1. It attracts a few more people to Vim (I use it as a signature).
  2. It sharpens your Vim skills.
  3. It's fun.

This "tip" shows that you can do some pretty complex stuff with the Vim -c command.

vim -c "cmd1|cmd2|cmd3"
# Example: print paste contents to default printer
gvim -c 's/^/\=@*/|hardcopy!|q!'


Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki