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 255 remaining solutions by signing in and submitting your own entry
#256 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: @Prafulfillment

256 active golfers, 655 entries

Leaderboard (lowest score wins):
12
#211 - Florian Gauger / @FlorianGauger

06/06/2017 at 01:13AM

12
#212 - Anthony George / @Xanuthatusu

06/11/2017 at 06:00AM

12
#213 - albalitz / @_albalitz

06/17/2019 at 03:30PM

12
#214 - Jin-hyeok Kim / @JinhyeokKim12

04/09/2023 at 04:16AM

12
#215 - 0xf00ff00f / @0xf00ff00f

01/05/2025 at 12:16AM

13
#216 - Pawel Obrok / @mrYapee

12/21/2012 at 12:59PM

13
#217 - Yi EungJun / @semtlnori

12/26/2012 at 06:59AM

13
#218 - Global Maquereau / @GlobalMaquereau

12/26/2012 at 09:04AM

13
#219 - Runar / @runarfu

01/12/2013 at 09:45AM

13
#220 - Steven Herbst / @transistorman

02/24/2013 at 11:56PM

13
#221 - Matt Robbins / @mcrmfc

03/29/2013 at 10:59PM

13
#222 - Piotr Śniegowski / @PiotrSniegowski

06/05/2013 at 08:28PM

13
#223 - Fernando Axel Ellis / @Axel_Ellis

10/02/2013 at 09:45PM

13
#224 - Dimiter Petrov / @crackofdusk

10/12/2013 at 06:06PM

13
#225 - Quota / @Quotad

01/10/2014 at 04:34PM

13
#226 - Tj / @yrddy

08/19/2014 at 06:59AM

13
#227 - SilentFl / @Silent_Fl

02/06/2015 at 02:06PM

13
#228 - Guillaume / @WeshGuillaume

04/09/2018 at 04:33PM

13
#229 - Jurica / @Jurica34581259

12/06/2018 at 03:47AM

13
#230 - tpoeiras / @tpoeirass

08/01/2021 at 03:49PM

13
#231 - x03n046 / @x03n046

05/13/2022 at 09:51AM

14
#232 - bob / @vg41

12/21/2012 at 10:02AM

14
#233 - Øystein Walle / @oysteinwalle

01/30/2013 at 10:28PM

14
#234 - foo / @foo88832727

10/18/2013 at 08:53PM

14
#235 - Daniel Low / @deniallow

08/07/2014 at 10:52PM

14
#236 - Michał Dytko / @DytkoM

12/28/2016 at 02:42PM

15
#237 - Pradeep Kumar 🇮🇳🇮🇳🇮🇳🇮🇱🇮🇱🇮🇱 / @pradeep6kumar

12/25/2012 at 04:29PM

15
#238 - mhb / @mhbvim

05/24/2013 at 10:33AM

16
#239 - Eric Kelly / @HeroicEric

05/30/2013 at 12:10AM

16
#240 - Ikypiky / @nerdbeereis

06/16/2016 at 01:13PM