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

419 active golfers, 1757 entries

Leaderboard (lowest score wins):
23
#331 - beew71493 / @beew71493

12/12/2018 at 10:59PM

23
#332 - Cocquecigrues / @cocquecigrues

12/17/2018 at 08:23PM

23
#333 -  Martijn Engler / @MartijnEngler

12/30/2018 at 07:58PM

23
#334 - PJ Frazer / @pj_frazer

01/14/2019 at 01:32AM

23
#335 - sébastien megret / @sebmegret

02/03/2019 at 12:29PM

23
#336 - vince / @vincentvangott

03/03/2019 at 12:49PM

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

04/14/2019 at 02:27PM

23
#338 - jirgn / @jirgn

04/20/2019 at 07:01PM

23
#339 - seul / @seul15987381

07/03/2019 at 09:25AM

23
#340 - Nathan Knox / @the_nathan_knox

07/15/2019 at 03:29PM

23
#341 - Not real / @Notreal70353016

07/23/2019 at 04:42AM

23
#342 - Hugo Tai / @HugoTai100

08/01/2019 at 09:16AM

23
#343 - Bob Ren / @bobrenjc93

08/05/2019 at 09:45PM

23
#344 - leo / @leo28356948

10/20/2019 at 04:48AM

23
#345 - Alex Emelianov / @AlexEmelianov3

11/04/2019 at 10:25PM

23
#346 - Chris Covert / @covertcj

11/08/2019 at 02:06AM

24
#347 - Vanildo S. Mangueira / @vanildo_souto

08/13/2018 at 01:57PM

24
#348 - editor3D / @editor3D

11/12/2018 at 06:45PM

24
#349 - xwlearn / @ixw1991

12/18/2018 at 04:32PM

24
#350 - Bao Dang / @baodang02

01/12/2019 at 06:48AM

24
#351 - Blah Blah / @BlahBla08410389

01/20/2019 at 06:44PM

24
#352 - Thomas Branch / @twighk

01/27/2019 at 01:44PM

24
#353 - py / @py97235249

01/31/2019 at 07:51AM

24
#354 - Michael Aquilina / @mikeaquilina4

02/02/2019 at 09:56PM

24
#355 - Emil Braserud / @Erdustiggen

03/16/2019 at 04:37PM

24
#356 - Vimfiz / @vimfiz

03/25/2019 at 11:05PM

24
#357 - JonasS / @jonas42s

05/29/2019 at 12:00PM

24
#358 - dtjong / @dtjong2

06/07/2019 at 10:10PM

24
#359 - Chadd Chambers / @dos_dees

07/03/2019 at 06:16AM

24
#360 - José / @AngelGaldamez

08/26/2019 at 03:57AM