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):
11
#151 - Jose Gutierrez / @Jogusa

10/22/2014 at 08:12PM

11
#152 - pftb12345 / @pftb12345

04/11/2015 at 01:49PM

11
#153 - François Marais / @maraisf

05/21/2015 at 06:50PM

11
#154 - Raj / @brshenoy

06/19/2015 at 08:49PM

11
#155 - Gerald Tilma / @GeraldTilma

10/22/2015 at 02:07AM

11
#156 - Ryan Marcotte / @ryanjmarcotte

11/16/2015 at 02:46PM

11
#157 - Johannes K / @JohannesK9

11/26/2015 at 11:47PM

11
#158 - fuck GFW / @ravishGFW

01/06/2016 at 04:48AM

11
#159 - Cristian Lupașcu / @clupasq

02/28/2016 at 04:16PM

11
#160 - Dimitar Dimitrov / @kurkale6ka

03/22/2016 at 02:40PM

11
#161 - Daniel Teal / @coelestinian

08/31/2016 at 08:48PM

11
#162 - Reinaldo Astudillo / @astudillor

03/23/2017 at 09:40AM

11
#163 - jakeroberts / @jakeroberts

05/28/2017 at 02:42PM

11
#164 - Brandon Blakeley / @zkelvin

11/25/2017 at 06:37AM

11
#165 - Luke Parsons / @lukeparsons

12/21/2017 at 09:31AM

11
#166 - Marius Jurgelenas / @MarenasLT

03/22/2018 at 12:59PM

11
#167 - Chenut Ludovic / @7Brwa7

04/19/2018 at 01:19PM

11
#168 - Timur Celik / @clktmr

12/22/2018 at 07:42PM

11
#169 - Mihai / @mihaicristiant

02/01/2019 at 08:07AM

11
#170 - Nick Yeow / @nickyeow

05/23/2019 at 01:13PM

11
#171 - Chester Yap / @Chest_ErYap

08/04/2019 at 04:33PM

11
#172 - Chrostopher Leu / @shaggadalic

01/10/2020 at 01:37PM

11
#173 - Johannes Riecken / @rubystallion

01/15/2020 at 09:28PM

12
#174 - Ravi S Sinha / @ambidextrousTx

12/19/2012 at 07:04AM

12
#175 - Kubek2k / @kubek2k

12/31/2012 at 10:45AM

12
#176 - Bertie Wooster / @bxwooster

01/04/2013 at 01:51PM

12
#177 - fumi komi / @kommy_vx

03/28/2013 at 05:13AM

12
#178 - Jesse Nazario / @JesseNazario

04/18/2013 at 01:48PM

12
#179 - Woojung Kim 김우중 / @_kimwz

07/15/2013 at 04:48AM

12
#180 - A / @Tower_1980

08/02/2013 at 11:36AM