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 5b6f0fcba89379000c2328a4

Swap values inside brackets

Easy challenge.

Start file
#Everyday routine... :\ 

amazing_func("Some amazing text", 123, variable) # Kittens

def func():
	return 'Stuff for making movement harder'

def func2(m):
	v = 0
	for i in range(10):
		v += i*m
		print(v, i, m)

very_strange_func(42, foobar, 'Another text') # Dogs

test = func()
func2(len(test))
End file
#Everyday routine... :\ 

amazing_func(42, foobar, 'Another text') # Kittens

def func():
	return 'Stuff for making movement harder'

def func2(m):
	v = 0
	for i in range(10):
		v += i*m
		print(v, i, m)

very_strange_func("Some amazing text", 123, variable) # Dogs

test = func()
func2(len(test))

View Diff

3c3
< amazing_func("Some amazing text", 123, variable) # Kittens
---
> amazing_func(42, foobar, 'Another text') # Kittens
14c14
< very_strange_func(42, foobar, 'Another text') # Dogs
---
> very_strange_func("Some amazing text", 123, variable) # Dogs

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 245 remaining solutions by signing in and submitting your own entry
#246 tuyen / @tuyen66827418 - Score: 151 - 11/19/18 @ 14:57
%jj%jkhvwbbbbbbbby:14<CR>%hp%jkhxhXXXXXXXXXXXXXXXXXXXXXXXXXx:3<CR>%XXXXXXXXBBXXWXWxuXXXXXXXXXXXXXXXXXXXXXXXpu<50-53>(42, foobar, 'Another text')<Esc>[201~%hXXcxxa<Left>c<Esc>ZZ

0 comments


Created by: @Tpouhuk2

246 active golfers, 995 entries

Leaderboard (lowest score wins):
22
#181 - 安藤 / @andou2106

09/03/2018 at 03:12PM

22
#182 - Ketan Agrawal / @ketanjayagrawal

09/24/2018 at 03:59PM

22
#183 - Edouard Piette / @EdPiette

10/09/2018 at 09:56AM

22
#184 - Dax / @daaawx

10/15/2018 at 07:39PM

22
#185 - Nicolas Erny / @nicolaspika

10/21/2018 at 01:18PM

22
#186 - Chris Maher / @chrismaherthe

11/14/2018 at 05:41PM

22
#187 - faisal / @faisalhackshah

11/25/2018 at 02:41AM

22
#188 - Evyk / @Mr_Evyk

12/19/2018 at 03:26PM

23
#189 - José M. Guisado / @_jmgg_

09/01/2018 at 08:01PM

23
#190 - gsvba / @gsvba

09/18/2018 at 09:37PM

23
#191 - Juan / @jubujjamer

10/17/2018 at 05:17PM

23
#192 - 王有铭 / @coder_ming

10/21/2018 at 06:17AM

23
#193 - Kasparas Lavrukaitis / @kaslvr

11/01/2018 at 01:46PM

23
#194 - dorpo / @dorpo2

11/01/2018 at 05:14PM

23
#195 - ajsantander / @_ajsantander

11/06/2018 at 12:39AM

23
#196 - Fabio Branquinho / @branquif

11/08/2018 at 01:24PM

23
#197 - Matze / @ebaharilikult

11/23/2018 at 09:21AM

23
#198 - beew71493 / @beew71493

12/12/2018 at 10:59PM

23
#199 - Cocquecigrues / @cocquecigrues

12/17/2018 at 08:23PM

23
#200 -  Martijn Engler / @MartijnEngler

12/30/2018 at 07:58PM

23
#201 - PJ Frazer / @pj_frazer

01/14/2019 at 01:32AM

24
#202 - Vanildo S. Mangueira / @vanildo_souto

08/13/2018 at 01:57PM

24
#203 - editor3D / @editor3D

11/12/2018 at 06:45PM

24
#204 - xwlearn / @ixw1991

12/18/2018 at 04:32PM

24
#205 - Bao Dang / @baodang02

01/12/2019 at 06:48AM

25
#206 - Bernhard Brunner / @13brunner

08/29/2018 at 01:28PM

25
#207 - Matt Robinson / @mmrobins

09/14/2018 at 03:47PM

25
#208 - Ruben Paz / @IstarEldritch

09/15/2018 at 11:30PM

25
#209 - Paul Weaver / @UKWeaver

11/21/2018 at 07:33PM

25
#210 - Neil Johari / @neiljohari

12/18/2018 at 07:50AM