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 by @GavinKoeng:

Unlock 13 remaining solutions by signing in and submitting your own entry
Created by: @Tpouhuk2

590 active golfers, 2539 entries

Solutions by @GavinKoeng:
14
#113 - Gavin / @GavinKoeng

02/26/2026 at 01:51AM

15
#>220 - Gavin / @GavinKoeng

02/26/2026 at 01:51AM

16
#>279 - Gavin / @GavinKoeng

02/26/2026 at 01:50AM

17
#>324 - Gavin / @GavinKoeng

02/26/2026 at 01:50AM

18
#>362 - Gavin / @GavinKoeng

02/26/2026 at 01:50AM

19
#>393 - Gavin / @GavinKoeng

02/26/2026 at 01:49AM

21
#>450 - Gavin / @GavinKoeng

02/26/2026 at 01:49AM

25
#>523 - Gavin / @GavinKoeng

02/26/2026 at 01:48AM

29
#>544 - Gavin / @GavinKoeng

02/26/2026 at 01:48AM

32
#>561 - Gavin / @GavinKoeng

02/26/2026 at 01:45AM

32
#>561 - Gavin / @GavinKoeng

02/26/2026 at 01:47AM

34
#>565 - Gavin / @GavinKoeng

02/26/2026 at 01:46AM

36
#>571 - Gavin / @GavinKoeng

02/26/2026 at 01:46AM