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

396 active golfers, 1640 entries

Leaderboard (lowest score wins):
15
#121 - Raul / @Raul50174499

04/23/2019 at 10:50AM

15
#122 - arsi arola / @mos_kiitto

06/24/2019 at 07:34PM

15
#123 - Chester Yap / @Chest_ErYap

07/11/2019 at 04:17AM

15
#124 - Joel Elkins / @dice_tea

08/03/2019 at 09:48PM

15
#125 - Adam Hartz / @awareofnow

08/22/2019 at 02:15AM

15
#126 - 波波 / @sbob87

08/26/2019 at 08:38AM

15
#127 - Marco Mannucci / @markomannux

08/26/2019 at 12:52PM

15
#128 - Christian / @paierlep

08/31/2019 at 08:14PM

15
#129 - Baine Wedlock / @BaineWedlock

09/12/2019 at 11:38AM

15
#130 - Benoit Benoit / @Benoit_Tgt

09/12/2019 at 12:25PM

15
#131 - Abner jr / @Abnerjr19

09/21/2019 at 04:39PM

16
#132 - Ítalo Vieira / @italoviieira

08/12/2018 at 01:04AM

16
#133 - Marco Magdy / @marcomacdee

08/12/2018 at 05:29PM

16
#134 - PCS Solutions / @PeteSolutions

08/13/2018 at 06:15AM

16
#135 - wes / @_weslly

08/14/2018 at 05:19AM

16
#136 - Valacar / @valacar

08/15/2018 at 03:28PM

16
#137 - Alexander Zheleznov / @ephemerr

08/16/2018 at 06:17AM

16
#138 - we’re going to need a bigger bot / @assaflavie

08/16/2018 at 02:51PM

16
#139 - Cam Smith / @Comradesmith

08/21/2018 at 09:45AM

16
#140 - ♜ Pepe Doval / @pepellou

08/21/2018 at 10:58PM

16
#141 - zhenshan Xue / @xzs572

08/30/2018 at 02:17AM

16
#142 - Weston Neal / @wtneal

08/31/2018 at 03:56PM

16
#143 - Trey Deitch / @differenceeq

08/31/2018 at 08:13PM

16
#144 - tadashi-aikawa / @Tadashi_MAMAN

09/02/2018 at 06:57AM

16
#145 - Luis Copetti / @lhcopetti

09/05/2018 at 02:01AM

16
#146 - Rich Cheng / @sedm0784

09/10/2018 at 03:00PM

16
#147 - Michael K. Gilbert / @michaelKgilbert

09/16/2018 at 07:22AM

16
#148 - Stefan Heyder / @Astheny_

09/17/2018 at 09:27AM

16
#149 - Jonathan de Wet / @jonpdw

09/20/2018 at 03:15AM

16
#150 - Arijus / @argshook

09/21/2018 at 11:47AM