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

325 active golfers, 1331 entries

Leaderboard (lowest score wins):
15
#91 - Mihai / @mihaicristiant

11/27/2018 at 11:16AM

15
#92 - Marty Boren / @computerliker

12/07/2018 at 04:18AM

15
#93 - alex m / @al_mk_

12/12/2018 at 05:40PM

15
#94 - Ruby Sapphire / @RubySapphire20

12/14/2018 at 03:32AM

15
#95 - Mangeart Yoric / @yoricm

01/20/2019 at 10:41AM

15
#96 - chocolate / @chocola81394123

01/20/2019 at 03:29PM

15
#97 - churaki / @churaki

01/30/2019 at 08:06AM

15
#98 - Mateen Ulhaq / @sicariusnoctis

02/12/2019 at 06:11AM

15
#99 - T A / @SirAviles

02/18/2019 at 08:27PM

15
#100 - Roger Stoltz / @rogsto1

02/28/2019 at 04:42PM

15
#101 - Francisco Esteve / @San475

03/11/2019 at 06:12AM

15
#102 - chenqiqi / @chenqiqi13

03/12/2019 at 01:30PM

15
#103 - enji / @enji_ja

03/18/2019 at 06:39PM

15
#104 - Mark Stillwell / @marklee77

04/06/2019 at 08:39PM

15
#105 - Gitsnik / @dracyrys

04/21/2019 at 12:29PM

15
#106 - Raul / @Raul50174499

04/23/2019 at 10:50AM

16
#107 - Ítalo Vieira / @italoviieira

08/12/2018 at 01:04AM

16
#108 - Marco Magdy / @marcomacdee

08/12/2018 at 05:29PM

16
#109 - PCS Solutions / @PeteSolutions

08/13/2018 at 06:15AM

16
#110 - wes / @_weslly

08/14/2018 at 05:19AM

16
#111 - Valacar / @valacar

08/15/2018 at 03:28PM

16
#112 - Alexander Zheleznov / @ephemerr

08/16/2018 at 06:17AM

16
#113 - Server Zero / @assaflavie

08/16/2018 at 02:51PM

16
#114 - Cam Smith / @Comradesmith

08/21/2018 at 09:45AM

16
#115 - ♜ Pepe Doval / @pepellou

08/21/2018 at 10:58PM

16
#116 - zhenshan Xue / @xzs572

08/30/2018 at 02:17AM

16
#117 - Weston Neal / @wtneal

08/31/2018 at 03:56PM

16
#118 - Trey Deitch / @differenceeq

08/31/2018 at 08:13PM

16
#119 - tadashi-aikawa / @Tadashi_MAMAN

09/02/2018 at 06:57AM

16
#120 - Luis Copetti / @lhcopetti

09/05/2018 at 02:01AM