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):
15
#211 - Pradeep Kumar 🇮🇳🇮🇳🇮🇳🇮🇱🇮🇱🇮🇱 / @pradeep6kumar

12/25/2012 at 04:29PM

15
#212 - mhb / @mhbvim

05/24/2013 at 10:33AM

16
#213 - Eric Kelly / @HeroicEric

05/30/2013 at 12:10AM

16
#214 - Ikypiky / @nerdbeereis

06/16/2016 at 01:13PM

17
#215 - XGOLFER / @vimg0lfer

01/05/2013 at 02:06AM

17
#216 - Eric Potter / @pottereric

05/27/2013 at 05:43PM

17
#217 - Daniel Gray / @DanielFGray

10/19/2013 at 04:17PM

17
#218 - Ryan van Rensburg / @rdvr001

07/23/2016 at 10:38AM

18
#219 - Florian Guilbert / @flgy

12/29/2012 at 09:20PM

18
#220 - matthew keesan / @keesan

03/06/2013 at 06:58PM

18
#221 - ltn614 / @ltn614

09/22/2015 at 03:50AM

20
#222 - Lieven Keersmaekers / @LievenKeersmaek

12/20/2012 at 03:31PM

21
#223 - Eric Andres / @eric_m_andres

12/21/2012 at 03:54AM

24
#224 - wilddog64 / @chengkai318

12/17/2013 at 09:23PM

31
#225 - Chirag Tailor / @ctailor2

01/29/2014 at 05:42AM

101
#226 - hasiotis / @hasiotis

04/16/2013 at 08:56PM