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

211 active golfers, 851 entries

Leaderboard (lowest score wins):
14
#1 - BaffaloP 🐃🎨 / @bbaffalopp

11/18/2018 at 07:28PM

14
#2 - Dax / @zacoxi

11/20/2018 at 01:21AM

14
#3 - Joeoe / @joeoe_

11/24/2018 at 02:57PM

14
#4 - Jonathan Cabezas / @John_Harkan

11/26/2018 at 05:48PM

14
#5 - unclewangshushu / @shuwushu

11/29/2018 at 11:59AM

14
#6 - あすたちん / @astatine0x55

12/01/2018 at 03:07PM

14
#7 - Artur Mróz / @MrozArtur

12/05/2018 at 08:04PM

14
#8 - Anant Mishra / @anantanni22

12/08/2018 at 03:53PM

15
#9 - Jon Krause / @jkrause314

08/11/2018 at 05:14PM

15
#10 - Kerson Hsiao / @KersonHsiao

08/12/2018 at 12:47AM

15
#11 - Smylers / @Smylers2

08/12/2018 at 08:54PM

15
#12 - Saki Gw / @Sakigw

08/13/2018 at 06:23AM

15
#13 - John Braxler / @braxler

08/13/2018 at 12:10PM

15
#14 - Charles Sun / @charles_sun90

08/13/2018 at 09:48PM

15
#15 - testingvimgolf / @testingvimgolf

08/14/2018 at 03:20AM

15
#16 - Keldwik Chaldain / @Suskeyhose

08/14/2018 at 07:59PM

15
#17 - 徐学健 / @zebrallel

08/15/2018 at 01:58AM

15
#18 - Søren Kjeil / @sfkjeil

08/15/2018 at 09:09AM

15
#19 - Simon Ingelsson / @_DeVVaN_

08/15/2018 at 12:19PM

15
#20 - Andre Cato / @DreBear800

08/18/2018 at 01:19AM

15
#21 - Артем Мухометзянов / @Timon_Surikat

08/18/2018 at 02:32PM

15
#22 - Rajesh Sharma / @deepredsky

08/18/2018 at 05:35PM

15
#23 - Sergio / @voyeg3r

08/19/2018 at 03:29PM

15
#24 - 🌀🦋Miriam Retka🦋🌀 / @miriamretka

08/19/2018 at 08:43PM

15
#25 - Hugo / @szeyattai

08/25/2018 at 06:50AM

15
#26 - A Programmer / @hlprogrammer

08/26/2018 at 12:13PM

15
#27 - Chi Jun / @jun13blu

08/28/2018 at 06:28AM

15
#28 - broken_art / @brokenart10

08/30/2018 at 01:42PM

15
#29 - Lee Saville / @LeeSaville

09/02/2018 at 07:03PM

15
#30 - Smith / @SVCSXV

09/03/2018 at 09:20PM