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 253 remaining solutions by signing in and submitting your own entry
#254 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

254 active golfers, 647 entries

Leaderboard (lowest score wins):
10
#1 - Urtica dioica / @udioica

12/19/2012 at 01:47AM

10
#2 - Tim Chase / @gumnos

12/19/2012 at 01:55AM

10
#3 - Kerson Hsiao / @KersonHsiao

12/19/2012 at 02:47AM

10
#4 - Édouard M'tou / @DouardM

12/19/2012 at 07:33AM

10
#5 - Conner McDaniel / @connermcd

12/19/2012 at 12:16PM

10
#6 - n0nick / @n0nick

12/19/2012 at 01:02PM

10
#7 - Taylor Rose / @trose89

12/19/2012 at 11:47PM

10
#8 - Hubba / @HubbaBubbaFett

12/20/2012 at 04:10PM

10
#9 - じょんあば / @john_ababa

12/20/2012 at 04:13PM

10
#10 - h_east (トロッコ6個) / @h_east

12/21/2012 at 04:35AM

10
#11 - Marco Hinz / @_mhinz_

12/21/2012 at 10:29AM

10
#12 - Victor Ramirez / @virako

12/21/2012 at 11:10AM

10
#13 - Marcin Szamotulski / @me_coot

12/21/2012 at 01:56PM

10
#14 - Jiří Chára / @JiriChara

12/21/2012 at 02:24PM

10
#15 - Marko Tibold / @markotibold

12/21/2012 at 11:31PM

10
#16 - Kajetan Bojko / @KajetanBojko

12/22/2012 at 04:53PM

10
#17 - jk / @kewnapse

12/23/2012 at 12:01AM

10
#18 - Toto l'haricot / @nico_le_terribl

12/26/2012 at 09:25AM

10
#19 - Daniel Baldwin / @danielcbaldwin

12/27/2012 at 05:02PM

10
#20 - Kevin Lin / @kevins8

01/03/2013 at 06:25AM

10
#21 - Yavor Atov / @YavorAtOff

01/03/2013 at 01:06PM

10
#22 - Ben / @ben_g_thomas

01/06/2013 at 12:55AM

10
#23 - Asmund / @herrasbe

01/13/2013 at 05:52PM

10
#24 - r / @tricosahedron

01/13/2013 at 11:00PM

10
#25 - たいちょ / @alpaca_taichou

01/15/2013 at 09:31AM

10
#26 - zealotrush / @zealotrush

01/28/2013 at 10:19AM

10
#27 - Taro Yamada / @t_yamada8karad

01/29/2013 at 08:05AM

10
#28 - Adelar S. Queiróz / @adelarsq

01/31/2013 at 12:57AM

10
#29 - Antti Rasmus / @antrasmus

01/31/2013 at 08:01PM

10
#30 - Steve Tjoa / @stevetjoa

02/03/2013 at 10:55PM