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

393 active golfers, 1629 entries

Leaderboard (lowest score wins):
20
#271 - Iggy / @iggredible

09/12/2019 at 03:29AM

21
#272 - Chirag Joshi / @thechijos

08/12/2018 at 11:59PM

21
#273 - Frank Korf / @OMGFrank

08/14/2018 at 02:16PM

21
#274 - Fellow Millennium / @Fellow2000

09/03/2018 at 10:22AM

21
#275 - Alexander / @vlasyuk_a

09/04/2018 at 07:16PM

21
#276 - Daniel Morandini / @MorandiniDaniel

09/19/2018 at 08:55AM

21
#277 - Reuben Narkwo / @reubwo

10/21/2018 at 07:22PM

21
#278 - Sxcy / @SxcyX

10/24/2018 at 08:01AM

21
#279 - Calvin Fong / @LordyBaka

11/03/2018 at 11:05AM

21
#280 - Zenghanzhang / @hzengroger

11/10/2018 at 06:36AM

21
#281 - Jes / @vim_jes

12/05/2018 at 12:33PM

21
#282 - Vending Machine / @storyn26383

12/16/2018 at 07:05AM

21
#283 - Bennett / @bennettbackward

12/18/2018 at 02:25PM

21
#284 - omrisarig / @omrisarig

01/09/2019 at 06:46PM

21
#285 - Kevin Ullmann / @kevosauce

01/15/2019 at 12:12AM

21
#286 - vim_ninja / @NinjaVim

08/19/2019 at 04:10AM

21
#287 - averageRandomPerson / @averageRandomP1

09/16/2019 at 10:43PM

22
#288 - 安藤 / @andou2106

09/03/2018 at 03:12PM

22
#289 - Ketan Agrawal / @_ketan0_

09/24/2018 at 03:59PM

22
#290 - Edouard Piette / @EdPiette

10/09/2018 at 09:56AM

22
#291 - Dax / @daaawx

10/15/2018 at 07:39PM

22
#292 - Nicolas Erny / @nicolaspika

10/21/2018 at 01:18PM

22
#293 - Chris Maher / @chrismaherthe

11/14/2018 at 05:41PM

22
#294 - faisal / @faisalhackshah

11/25/2018 at 02:41AM

22
#295 - Evyk / @Mr_Evyk

12/19/2018 at 03:26PM

22
#296 - zenwalker / @zenwalker93

03/09/2019 at 01:26PM

22
#297 - Izaak van Dongen / @goedel_gang

04/28/2019 at 12:20AM

22
#298 - Am Jam / @LoneJam

06/11/2019 at 08:53PM

22
#299 - Артур Кашаев / @KashaevArthur

07/10/2019 at 08:57AM

22
#300 - Floyd Gantt / @fgantt

07/16/2019 at 08:30PM