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

404 active golfers, 1685 entries

Leaderboard (lowest score wins):
22
#301 - Dax / @daaawx

10/15/2018 at 07:39PM

22
#302 - Nicolas Erny / @nicolaspika

10/21/2018 at 01:18PM

22
#303 - Chris Maher / @chrismaherthe

11/14/2018 at 05:41PM

22
#304 - faisal / @faisalhackshah

11/25/2018 at 02:41AM

22
#305 - Evyk / @Mr_Evyk

12/19/2018 at 03:26PM

22
#306 - zenwalker / @zenwalker93

03/09/2019 at 01:26PM

22
#307 - Izaak van Dongen / @goedel_gang

04/28/2019 at 12:20AM

22
#308 - Am Jam / @LoneJam

06/11/2019 at 08:53PM

22
#309 - Артур Кашаев / @KashaevArthur

07/10/2019 at 08:57AM

22
#310 - Floyd Gantt / @fgantt

07/16/2019 at 08:30PM

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

09/01/2018 at 08:01PM

23
#312 - gsvba / @gsvba

09/18/2018 at 09:37PM

23
#313 - Juan / @jubujjamer

10/17/2018 at 05:17PM

23
#314 - 王有铭 / @coder_ming

10/21/2018 at 06:17AM

23
#315 - Kasparas Lavrukaitis / @kaslvr

11/01/2018 at 01:46PM

23
#316 - dorpo / @dorpo2

11/01/2018 at 05:14PM

23
#317 - ajs / @_ajsantander

11/06/2018 at 12:39AM

23
#318 - Fabio Branquinho / @branquif

11/08/2018 at 01:24PM

23
#319 - Matze / @ebaharilikult

11/23/2018 at 09:21AM

23
#320 - beew71493 / @beew71493

12/12/2018 at 10:59PM

23
#321 - Cocquecigrues / @cocquecigrues

12/17/2018 at 08:23PM

23
#322 -  Martijn Engler / @MartijnEngler

12/30/2018 at 07:58PM

23
#323 - PJ Frazer / @pj_frazer

01/14/2019 at 01:32AM

23
#324 - sébastien megret / @sebmegret

02/03/2019 at 12:29PM

23
#325 - vince / @vincentvangott

03/03/2019 at 12:49PM

23
#326 - phoibos92@gmail.com / @phoibos92

04/14/2019 at 02:27PM

23
#327 - jirgn / @jirgn

04/20/2019 at 07:01PM

23
#328 - seul / @seul15987381

07/03/2019 at 09:25AM

23
#329 - Nathan Knox / @the_nathan_knox

07/15/2019 at 03:29PM

23
#330 - Not real / @Notreal70353016

07/23/2019 at 04:42AM