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):
10
#271 - Udbhav Muthakana / @udbhavm_

08/27/2020 at 01:28AM

10
#272 - Menaal Cochran / @CochranMenaal

08/29/2020 at 07:23PM

10
#273 - Camilo A. Matajira / @CamiloMatajira

08/29/2020 at 07:24PM

10
#274 - Skyler Dong / @skylerdong

08/30/2020 at 07:19PM

10
#275 - Cristian Cazacu / @kryshac

08/30/2020 at 08:25PM

10
#276 - Hardik Upadhyay / @HardikU84218026

09/01/2020 at 07:29AM

10
#277 - Sebastian W. / @Sebasti91439242

09/01/2020 at 06:09PM

10
#278 - Aaron Cooley / @acoolz

09/02/2020 at 04:25AM

10
#279 - Oartapnag / @praveer_n

09/02/2020 at 12:44PM

10
#280 - akouryy / @akouryy1

09/05/2020 at 03:04AM

10
#281 - yhgolf / @yhgolf1

09/05/2020 at 03:35PM

10
#282 - Henry / @hwcharlton

09/05/2020 at 04:15PM

10
#283 - Ítalo Vieira / @italoviieira

09/06/2020 at 03:26PM

10
#284 - HarrisonSGolf / @HarrisonSGolf1

09/06/2020 at 08:37PM

10
#285 - 刘宏亮 / @AkeyCoy

09/07/2020 at 06:35AM

10
#286 - Nick Edwards / @edwardsnjd

09/07/2020 at 02:59PM

10
#287 - M / @M88566443

09/08/2020 at 07:01PM

10
#288 - Blake Tereau / @BlakeTereau

09/09/2020 at 02:36AM

10
#289 - TheSemicolon / @the_semicolon_

09/09/2020 at 07:25AM

10
#290 - Rayduck / @RuidaDing

09/11/2020 at 07:04AM

10
#291 - Piotr Kaznowski / @kaznowski

09/13/2020 at 10:58AM

10
#292 - Sergey Averkiev / @ExAnimoso

09/14/2020 at 09:50AM

10
#293 - JBL / @jbl428

09/15/2020 at 12:43PM

10
#294 - Colby Morrison / @ColburnMorrison

09/16/2020 at 04:17AM

10
#295 - Andrew McKinlay / @ihavethecon

09/16/2020 at 11:30PM

10
#296 - Sergey Yakovlev / @selfuryon

09/20/2020 at 08:17PM

10
#297 - Prashanth / @Prashanth157T

09/21/2020 at 05:06PM

10
#298 - as-night / @asnight2

09/22/2020 at 10:59PM

10
#299 - Jimmy / @Jimmy67669554

09/23/2020 at 07:27PM

10
#300 - Алексей Ковалев / @FrostMephi

09/24/2020 at 11:32AM