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 50d0d80eaa503f000200001b

Swap assigned value

Simple problem but looking for interesting solutions.

Start file
app.config['CHALLENGE_FOLDER'] = SOLUTIONS_FOLDER
app.config['SOLUTIONS_FOLDER'] = CHALLENGE_FOLDER
End file
app.config['CHALLENGE_FOLDER'] = CHALLENGE_FOLDER
app.config['SOLUTIONS_FOLDER'] = SOLUTIONS_FOLDER

View Diff

diff --git 1/tmp/vimgolf_problem.in 2/tmp/vimgolf_problem.out
index 686e836..225e001 100644
--- 1/tmp/vimgolf_problem.in
+++ 2/tmp/vimgolf_problem.out
@@ -1,2 +1,2 @@
-app.config['CHALLENGE_FOLDER'] = SOLUTIONS_FOLDER
-app.config['SOLUTIONS_FOLDER'] = CHALLENGE_FOLDER
+app.config['CHALLENGE_FOLDER'] = CHALLENGE_FOLDER
+app.config['SOLUTIONS_FOLDER'] = SOLUTIONS_FOLDER

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 225 remaining solutions by signing in and submitting your own entry
#226 hasiotis / @hasiotis - Score: 101 - 04/16/13 @ 20:56
:%s/=\(\)<Left><Left><Left><Left> <Right><Right>.*<Right><Right>\n<BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS>:<Tab>%s/\(.*\) = \(.*\)\n\(.*\) = \(.*\)/\1 = \4\r\3 = \2/<CR>:<Up><Home><Del><CR>:wq<CR>

0 comments


Created by: @ThePrafulMathur

226 active golfers, 525 entries

Leaderboard (lowest score wins):
12
#181 - Bart of Denver / @bartofdenver

08/12/2013 at 03:33PM

12
#182 - James / @Dronak

08/29/2013 at 03:43PM

12
#183 - Hachez Floran / @FloranHachez

09/03/2013 at 08:16PM

12
#184 - Va bien te faire fou / @mplayer_vimgolf

03/21/2014 at 12:59PM

12
#185 - ryk / @rykarn

05/02/2014 at 08:30PM

12
#186 - Rathrio / @Rathrio

09/02/2014 at 12:12PM

12
#187 - Adam Redfern / @AdmRedfern

12/23/2014 at 09:31AM

12
#188 - Etienne Tremel / @etiennetremel

02/20/2016 at 09:14PM

12
#189 - Florian Gauger / @FlorianGauger

06/06/2017 at 01:13AM

12
#190 - Anthony George / @Xanuthatusu

06/11/2017 at 06:00AM

12
#191 - albalitz / @_albalitz

06/17/2019 at 03:30PM

13
#192 - Pawel Obrok / @mrYapee

12/21/2012 at 12:59PM

13
#193 - Yi EungJun / @semtlnori

12/26/2012 at 06:59AM

13
#194 - Global Maquereau / @GlobalMaquereau

12/26/2012 at 09:04AM

13
#195 - Runar / @runarfu

01/12/2013 at 09:45AM

13
#196 - Steven Herbst / @transistorman

02/24/2013 at 11:56PM

13
#197 - Matt Robbins / @mcrmfc

03/29/2013 at 10:59PM

13
#198 - Piotr Śniegowski / @PiotrSniegowski

06/05/2013 at 08:28PM

13
#199 - Fernando Axel Ellis / @Axel_Ellis

10/02/2013 at 09:45PM

13
#200 - Dimiter Petrov / @crackofdusk

10/12/2013 at 06:06PM

13
#201 - Quota / @Quotad

01/10/2014 at 04:34PM

13
#202 - Tj / @yrddy

08/19/2014 at 06:59AM

13
#203 - SilentFl / @Silent_Fl

02/06/2015 at 02:06PM

13
#204 - Guillaume / @WeshGuillaume

04/09/2018 at 04:33PM

13
#205 - Jurica / @Jurica34581259

12/06/2018 at 03:47AM

14
#206 - bob / @vg41

12/21/2012 at 10:02AM

14
#207 - Øystein Walle / @oysteinwalle

01/30/2013 at 10:28PM

14
#208 - foo / @foo88832727

10/18/2013 at 08:53PM

14
#209 - Daniel Low / @deniallow

08/07/2014 at 10:52PM

14
#210 - Michał Dytko / @DytkoM

12/28/2016 at 02:42PM