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

294 active golfers, 1187 entries

Leaderboard (lowest score wins):
21
#211 - Bennett / @bennettbackward

12/18/2018 at 02:25PM

21
#212 - omrisarig / @omrisarig

01/09/2019 at 06:46PM

21
#213 - Kevin Ullmann / @kevosauce

01/15/2019 at 12:12AM

22
#214 - 安藤 / @andou2106

09/03/2018 at 03:12PM

22
#215 - Ketan Agrawal / @_ketan0_

09/24/2018 at 03:59PM

22
#216 - Edouard Piette / @EdPiette

10/09/2018 at 09:56AM

22
#217 - Dax / @daaawx

10/15/2018 at 07:39PM

22
#218 - Nicolas Erny / @nicolaspika

10/21/2018 at 01:18PM

22
#219 - Chris Maher / @chrismaherthe

11/14/2018 at 05:41PM

22
#220 - faisal / @faisalhackshah

11/25/2018 at 02:41AM

22
#221 - Evyk / @Mr_Evyk

12/19/2018 at 03:26PM

22
#222 - zenwalker / @zenwalker93

03/09/2019 at 01:26PM

23
#223 - José M. Guisado / @_jmgg_

09/01/2018 at 08:01PM

23
#224 - gsvba / @gsvba

09/18/2018 at 09:37PM

23
#225 - Juan / @jubujjamer

10/17/2018 at 05:17PM

23
#226 - 王有铭 / @coder_ming

10/21/2018 at 06:17AM

23
#227 - Kasparas Lavrukaitis / @kaslvr

11/01/2018 at 01:46PM

23
#228 - dorpo / @dorpo2

11/01/2018 at 05:14PM

23
#229 - ajsantander / @_ajsantander

11/06/2018 at 12:39AM

23
#230 - Fabio Branquinho / @branquif

11/08/2018 at 01:24PM

23
#231 - Matze / @ebaharilikult

11/23/2018 at 09:21AM

23
#232 - beew71493 / @beew71493

12/12/2018 at 10:59PM

23
#233 - Cocquecigrues / @cocquecigrues

12/17/2018 at 08:23PM

23
#234 -  Martijn Engler / @MartijnEngler

12/30/2018 at 07:58PM

23
#235 - PJ Frazer / @pj_frazer

01/14/2019 at 01:32AM

23
#236 - sébastien megret / @sebmegret

02/03/2019 at 12:29PM

23
#237 - vince / @vincentvangott

03/03/2019 at 12:49PM

24
#238 - Vanildo S. Mangueira / @vanildo_souto

08/13/2018 at 01:57PM

24
#239 - editor3D / @editor3D

11/12/2018 at 06:45PM

24
#240 - xwlearn / @ixw1991

12/18/2018 at 04:32PM