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):
16
#121 - Rich Cheng / @sedm0784

09/10/2018 at 03:00PM

16
#122 - Michael K. Gilbert / @michaelKgilbert

09/16/2018 at 07:22AM

16
#123 - Stefan Heyder / @Astheny_

09/17/2018 at 09:27AM

16
#124 - Jonathan de Wet / @jonpdw

09/20/2018 at 03:15AM

16
#125 - Arijus / @argshook

09/21/2018 at 11:47AM

16
#126 - Vasil Mikhalenya / @bazillek

09/22/2018 at 07:12PM

16
#127 - DoubleIA / @IaDouble

09/30/2018 at 09:24AM

16
#128 - Yogesh Lonkar / @yogeshlor

10/03/2018 at 08:57AM

16
#129 - foobarbazqux12345 / @foobarbazqux121

10/13/2018 at 08:02PM

16
#130 - matthew brett / @matthewbrett

10/29/2018 at 12:39AM

16
#131 - Wouter Horlings / @Achilleshiel

11/09/2018 at 12:56PM

16
#132 - Nir Givon / @nir_givon

11/11/2018 at 11:39AM

16
#133 - Timothy Michael Fox / @Timothy_M_Fox

12/04/2018 at 03:10PM

16
#134 - Rossi / @mrossinek

12/04/2018 at 10:01PM

16
#135 - Christopher Weyand / @swordman378

02/11/2019 at 05:13PM

16
#136 - Manos Koutselakis / @koutselakis_m

05/05/2019 at 04:33PM

16
#137 - Arno / @arnoxmp

05/08/2019 at 05:11PM

16
#138 - arsi arola / @mos_kiitto

05/15/2019 at 04:35PM

16
#139 - Daniel Hakimian / @danrafhak

05/15/2019 at 05:44PM

17
#140 - Oka / @the_white_oak

08/11/2018 at 04:51PM

17
#141 - _Tpouhuk / @Tpouhuk2

08/11/2018 at 05:29PM

17
#142 - Jan Bundesmann / @janbundesmann

08/13/2018 at 08:59AM

17
#143 - Vova Blet / @VovaBlet

08/21/2018 at 08:17PM

17
#144 - Jorge / @jherreso

09/02/2018 at 05:06AM

17
#145 - chaotic / @laersn

09/07/2018 at 12:09PM

17
#146 - My Info / @michaelmdeng

09/19/2018 at 03:58AM

17
#147 - Marius Jurgelenas / @MarenasLT

09/21/2018 at 11:47AM

17
#148 - a / @UseForVim

10/04/2018 at 06:07AM

17
#149 - caplod / @caplod

10/17/2018 at 07:53PM

17
#150 - oracle / @oracle24986322

10/20/2018 at 04:59AM