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

249 active golfers, 1010 entries

Leaderboard (lowest score wins):
15
#31 - A Programmer / @hlprogrammer

08/26/2018 at 12:13PM

15
#32 - Chi Jun / @jun13blu

08/28/2018 at 06:28AM

15
#33 - broken_art / @brokenart10

08/30/2018 at 01:42PM

15
#34 - Lee Saville / @LeeSaville

09/02/2018 at 07:03PM

15
#35 - Smith / @SVCSXV

09/03/2018 at 09:20PM

15
#36 - Epecb / @BceEpecb

09/03/2018 at 11:03PM

15
#37 - Ali Mostafavi / @Ali_Mostafavi_

09/04/2018 at 04:42PM

15
#38 - Test / @TheVastComplex

09/05/2018 at 06:44PM

15
#39 - a / @a05150445

09/06/2018 at 01:53AM

15
#40 - Jeff / @sir_wiggles3

09/07/2018 at 06:56AM

15
#41 - royer / @RoyerMoyer1

09/10/2018 at 08:08PM

15
#42 - Bart3k / @Bart3k3

09/11/2018 at 04:24PM

15
#43 - Matt Burg / @matsbleurgh

09/11/2018 at 09:45PM

15
#44 - Wutimatic / @sarawoot_s

09/14/2018 at 06:56PM

15
#45 - Rebecca V. / @rxbxccxv

09/15/2018 at 06:14AM

15
#46 - hen don / @hendon112

09/15/2018 at 06:09PM

15
#47 - konankun / @__konankun

09/18/2018 at 03:01AM

15
#48 - Turkey Man / @lvturkeyman

09/19/2018 at 10:00AM

15
#49 - bignos / @bignos2

09/24/2018 at 12:39PM

15
#50 - Brendan B Amdocs / @AmdocsB

09/26/2018 at 04:00PM

15
#51 - Yudi Matsuzake / @yudimatsuzake

09/26/2018 at 06:59PM

15
#52 - Will / @VVi11_I_AM

09/30/2018 at 09:13PM

15
#53 - Roger Bongers / @RogerBongers

10/02/2018 at 11:49AM

15
#54 - John Oleksowicz / @JohnOlek

10/05/2018 at 05:06PM

15
#55 - Taylor Shane Hawkins / @underempire

10/08/2018 at 08:32PM

15
#56 - Benjamin Kiesl / @BenjaminKiesl

10/10/2018 at 02:04PM

15
#57 - James LaChance / @FatBoyXPC

10/11/2018 at 08:31AM

15
#58 - Sam Kim / @samkimhis

10/11/2018 at 05:35PM

15
#59 - Sebastian Korten / @FlashKorten

10/12/2018 at 04:16PM

15
#60 - nobody that important / @nobodythatimpo2

10/12/2018 at 11:16PM