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 5666943bac55c907fd02066f

comments galore

Basic comment reformatting

Start file
/*
 * comments
 * yay comments
 * so informative, the information is really yes
 * wowowowowow
 * mind blown
 * and that's how the allocator works
 */
End file
// comments
// yay comments
// so informative, the information is really yes
// wowowowowow
// mind blown
// and that's how the allocator works

View Diff

1,8c1,6
< /*
<  * comments
<  * yay comments
<  * so informative, the information is really yes
<  * wowowowowow
<  * mind blown
<  * and that's how the allocator works
<  */
---
> // comments
> // yay comments
> // so informative, the information is really yes
> // wowowowowow
> // mind blown
> // and that's how the allocator works

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 409 remaining solutions by signing in and submitting your own entry
#410 Jay Hack / @_jayhack_ - Score: 68 - 12/18/15 @ 04:14
dd7ggdd:%i<BS>A<BS>I//<BS><BS><BS><BS>%s/*<BS>\*//<BS>\/\/<CR><Up><Up><Up><Up><Up><BS>x<Down>xjxjxjxjxjkkkkkjjjjjj:wq<CR>

0 comments


Created by: @tedsta0

410 active golfers, 970 entries

Leaderboard (lowest score wins):
10
#271 - wrglprmft1 / @wrglprmft1

01/26/2019 at 03:06PM

10
#272 - Mateen Ulhaq / @sicariusnoctis

02/16/2019 at 11:57PM

10
#273 - πšƒπš’πšπš˜πšžπšŠπš— πšƒπšŽπš’πšœπšœπš’πšŽπš› / @TitouanT_

04/09/2019 at 11:28PM

10
#274 - Grant / @grant_7788

05/13/2019 at 08:59AM

10
#275 - Π”ΠΈΠΌΠ° / @dimkino

05/31/2019 at 10:22AM

10
#276 - majo senf / @majo_senf

06/18/2019 at 01:34PM

10
#277 - garry quested / @GQuested

07/21/2019 at 06:52AM

10
#278 - Chester Yap / @Chest_ErYap

08/15/2019 at 10:18PM

10
#279 - MiΕ‚osz Łakomy / @foobar01123

08/25/2019 at 08:25AM

10
#280 - Ariel Miculas / @ArielMiculas

09/25/2019 at 04:11PM

10
#281 - JosΓ© / @AngelGaldamez

05/07/2020 at 11:40PM

10
#282 - RockerZZY / @rocker_zzy

06/12/2020 at 04:35AM

10
#283 - Jason / @roosjason

06/29/2020 at 07:18AM

10
#284 - Ming Dai / @MingDai2

07/02/2020 at 05:32AM

10
#285 - Vinay Sharma / @VinaySh63956554

08/14/2020 at 02:50PM

10
#286 - chocolate / @chocola81394123

11/27/2020 at 08:38AM

10
#287 - Ray Dennis / @raysden

01/05/2021 at 11:16PM

10
#288 - hepebexè / @hepebexe

01/09/2021 at 09:31PM

10
#289 - A A A / @37fatos

01/21/2021 at 01:02AM

10
#290 - Jung Yeon Park / @park_jungy

01/27/2021 at 09:28PM

10
#291 - κΉ€λ²”μ€€ / @kmbmjn

05/11/2021 at 02:15AM

10
#292 - nedlog / @nedlog18

05/21/2021 at 07:11AM

10
#293 - Arya Kumar / @SusSquirrel

05/24/2021 at 11:20PM

10
#294 - Nick Repetti / @nick_repetti

09/23/2021 at 02:55AM

10
#295 - Jean George / @JeanGeo20504212

10/09/2021 at 08:58PM

10
#296 - Jeo / @jakub_smelko

10/26/2021 at 05:44PM

11
#297 - aisapatino / @aisapatino

12/09/2015 at 12:17AM

11
#298 - vimgolf / @myspare307

12/16/2015 at 07:26PM

11
#299 - Andy Loomis / @alumux

12/23/2015 at 11:51AM

11
#300 - Konrad Heidler / @koheidler

12/26/2015 at 02:20PM