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):
10
#91 - Daniël De Koker / @daniel_koker

07/26/2018 at 08:57PM

10
#92 - majo senf / @majo_senf

06/25/2019 at 12:47PM

10
#93 - Lory / @Lory46845742

12/06/2019 at 09:52AM

10
#94 - Miłosz Łakomy / @foobar01123

02/14/2020 at 08:41PM

10
#95 - RockerZZY / @rocker_zzy

06/26/2020 at 02:57AM

10
#96 - Ming Dai / @MingDai2

07/06/2020 at 02:49PM

10
#97 - mindgitrwx / @mindgitrwx

08/30/2020 at 10:06AM

11
#98 - DR / @dde81

12/18/2012 at 09:08PM

11
#99 - Ricardo Mendes / @locks

12/18/2012 at 09:09PM

11
#100 - z0k / @z0k

12/19/2012 at 11:32AM

11
#101 - joe di castro / @joe_di_castro

12/19/2012 at 12:12PM

11
#102 - すー / @cubebit

12/19/2012 at 01:23PM

11
#103 - buz / @buzbone

12/20/2012 at 11:43AM

11
#104 - Xinruo Sun / @xiaoruoruo

12/22/2012 at 12:31PM

11
#105 - Matt Garriott / @GarriottMatt

12/27/2012 at 12:28AM

11
#106 - cheerfulstoic / @cheerfulstoic

12/28/2012 at 09:00PM

11
#107 - Tetsuya Matsuyama / @m_tetsuya

12/30/2012 at 12:57PM

11
#108 - Khoi Tran / @khoitran19

01/02/2013 at 05:07PM

11
#109 - Alec Goebel / @zego5360

01/04/2013 at 03:48AM

11
#110 - Filip / @fylyps_tw

01/05/2013 at 01:18PM

11
#111 - Vasil Sakarov / @vsakarov

01/07/2013 at 12:34PM

11
#112 - Peter Xiao / @PterXiao

01/23/2013 at 04:57AM

11
#113 - CY / @wongcy0

01/27/2013 at 09:47AM

11
#114 - Christopher Harrison / @Xophmeister

01/28/2013 at 12:13PM

11
#115 - fabiano taddei / @Brodoblu

02/03/2013 at 04:21PM

11
#116 - Matt Redding / @MattRedding

02/18/2013 at 10:54AM

11
#117 - Ilya Loginov / @_zerone_

02/24/2013 at 10:18PM

11
#118 - Andrés Llopis / @andreselsuave

03/04/2013 at 01:16AM

11
#119 - Niil Öhlin / @Niil94

03/04/2013 at 09:33PM

11
#120 - Bailey Ling / @blingcoder

03/09/2013 at 04:16AM