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 518 remaining solutions by signing in and submitting your own entry
#519 ser / @ser_robo - Score: 154 - 02/29/20 @ 08:36
jjr<Esc>wwciwcjhh<Esc>hhhhce42,<Esc>wcf"foobar<Esc>wwce''h<BS><Left>Another text<Esc>wwce<Esc>hxx<Esc>r<Esc>jjjjjj154<BS><BS>14Geeehce""<Left>Some amazing text<Esc>r<Esc>ewce123<Esc>wwce<Esc>c<Esc>llcf'variable<Esc>ba<Esc>i<BS><Esc>jjj<Esc>:wq<CR>

0 comments


Created by: @Tpouhuk2

519 active golfers, 2257 entries

Leaderboard (lowest score wins):
23
#421 - phoibos92@gmail.com / @phoibos92

04/14/2019 at 02:27PM

23
#422 - jirgn / @jirgn

04/20/2019 at 07:01PM

23
#423 - seul / @seul15987381

07/03/2019 at 09:25AM

23
#424 - Nathan Knox / @the_nathan_knox

07/15/2019 at 03:29PM

23
#425 - Not real / @Notreal70353016

07/23/2019 at 04:42AM

23
#426 - Hugo Tai / @HugoTai100

08/01/2019 at 09:16AM

23
#427 - Bob Ren / @bobrenjc93

08/05/2019 at 09:45PM

23
#428 - leo / @leo28356948

10/20/2019 at 04:48AM

23
#429 - Alex Emelianov / @AlexEmelianov3

11/04/2019 at 10:25PM

23
#430 - Chris Covert / @covertcj

11/08/2019 at 02:06AM

23
#431 - mowglian / @mowglian

01/18/2020 at 04:03PM

23
#432 - Hannes Käufler / @hanneskaeufler

07/05/2020 at 07:58PM

23
#433 - drGsus / @drGsus

07/25/2020 at 01:42PM

24
#434 - Vanildo S. Mangueira / @vanildo_souto

08/13/2018 at 01:57PM

24
#435 - editor3D / @editor3D

11/12/2018 at 06:45PM

24
#436 - xwlearn / @ixw1991

12/18/2018 at 04:32PM

24
#437 - Bao Dang / @baodang02

01/12/2019 at 06:48AM

24
#438 - Blah Blah / @BlahBla08410389

01/20/2019 at 06:44PM

24
#439 - Thomas Branch / @twighk

01/27/2019 at 01:44PM

24
#440 - py / @py97235249

01/31/2019 at 07:51AM

24
#441 - Michael Aquilina / @mikeaquilina4

02/02/2019 at 09:56PM

24
#442 - Emil Braserud / @Erdustiggen

03/16/2019 at 04:37PM

24
#443 - Vimfiz / @vimfiz

03/25/2019 at 11:05PM

24
#444 - JonasS / @jonas42s

05/29/2019 at 12:00PM

24
#445 - dtjong / @dtjong2

06/07/2019 at 10:10PM

24
#446 - Chadd Chambers / @dos_dees

07/03/2019 at 06:16AM

24
#447 - José / @AngelGaldamez

08/26/2019 at 03:57AM

24
#448 - Steve Racanovic / @steve_racanovic

01/13/2020 at 09:50PM

24
#449 - John Doe / @JohnDoe77150954

03/22/2020 at 06:21PM

24
#450 - Silvano Biemans / @smbiemans

07/25/2020 at 05:36PM