Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 5e4dfcccaa2db400090b66c3

prepend * to every non-blank line

Prepend an asterisk to every non-blank line in the input file.

Start file
This is a
very
short

file
, but it is
still
full

of

surpises
.
End file
*This is a
*very short

*file, but it is
*still
*full

*of

*surpises.

View Diff

1,2c1,2
< This is a
< very short
---
> *This is a
> *very short
4,6c4,6
< file, but it is
< still
< full
---
> *file, but it is
> *still
> *full
8c8
< of
---
> *of
10c10
< surpises.
---
> *surpises.

Solutions

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 1547 remaining solutions by signing in and submitting your own entry
Created by: @johnreitano

1548 active golfers, 6352 entries

Leaderboard (lowest score wins):
11
#481 - vtls / @vtls16

03/07/2020 at 06:07AM

11
#482 - Fernando Serboncini / @fserb

03/07/2020 at 04:05PM

11
#483 - Aioriya / @AioriyaDonk

03/08/2020 at 02:24AM

11
#484 - drudd / @drudd

03/08/2020 at 03:19AM

11
#485 - Alexander Brömmer / @Superbort

03/08/2020 at 05:14PM

11
#486 - Guillaume Vigeant / @GVigeant

03/09/2020 at 06:56PM

11
#487 - Jonghyun Yun / @JonghyunYun

03/09/2020 at 08:59PM

11
#488 - Brian Lause / @TallBrianL

03/12/2020 at 03:01AM

11
#489 - Nguyen Hung / @Ikazuchi16

03/13/2020 at 06:44AM

11
#490 - Khalid Harun / @KhalidHarun

03/14/2020 at 03:26AM

11
#491 - Md Saif / @saif47

03/14/2020 at 08:29AM

11
#492 - Paul Inc / @hiniol1982

03/15/2020 at 08:24PM

11
#493 - Edan Sneh / @edan_sneh

03/17/2020 at 06:29AM

11
#494 - vvaannaa3 / @vvaannaa3

03/17/2020 at 03:25PM

11
#495 - Under Blown / @iovuio

03/18/2020 at 04:05AM

11
#496 - Caique Santana / @_caique39

03/20/2020 at 03:17AM

11
#497 - Roger Stoltz / @rogsto1

03/20/2020 at 10:36PM

11
#498 - Osama Abdelsatar / @Osa_ahlawy

03/21/2020 at 10:45PM

11
#499 - Rodrigo V. Lopes / @rodvlopes

03/22/2020 at 07:03PM

11
#500 - Quark / @PuzzleQuark

03/22/2020 at 07:27PM

11
#501 - Global Maquereau / @GlobalMaquereau

03/23/2020 at 06:40AM

11
#502 - Costel Radulescu / @_wizard_

03/23/2020 at 10:42PM

11
#503 - agricantare / @agricantare

03/25/2020 at 06:46AM

11
#504 - BartJanssen / @BartJanssen

03/25/2020 at 08:40AM

11
#505 - eshel / @EshelBM

03/25/2020 at 07:06PM

11
#506 - Alexander / @Alexand64026860

03/26/2020 at 06:37PM

11
#507 - tinyfat / @tanghaijun12345

03/27/2020 at 09:12AM

11
#508 - Amado Antonini / @AmadoAntonini

03/29/2020 at 11:50AM

11
#509 - Ray Guan / @guanxi555

03/30/2020 at 02:49AM

11
#510 - RaylanFox / @RaylanFox

04/05/2020 at 08:03AM