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 498 remaining solutions by signing in and submitting your own entry
#499 ser / @ser_robo - Score: 154 - 02/29/20 @ 08:36
jjr<Esc>wwciwcjhh<Esc>hhhhce42,<Esc>wcf"foobar<Esc>wwce''h<BS><Left>Another text<Esc>wwce<Esc>hxx<Esc>r<Esc>jjjjjj154<BS><BS>14Geeehce""<Left>Some amazing text<Esc>r<Esc>ewce123<Esc>wwce<Esc>c<Esc>llcf'variable<Esc>ba<Esc>i<BS><Esc>jjj<Esc>:wq<CR>

0 comments


Created by: @Tpouhuk2

499 active golfers, 2165 entries

Leaderboard (lowest score wins):
16
#211 - Christopher Weyand / @swordman378

02/11/2019 at 05:13PM

16
#212 - Manos Koutselakis / @koutselakis_m

05/05/2019 at 04:33PM

16
#213 - Arno / @arnoxmp

05/08/2019 at 05:11PM

16
#214 - Daniel Hakimian / @danrafhak

05/15/2019 at 05:44PM

16
#215 - albalitz / @_albalitz

06/06/2019 at 01:21PM

16
#216 - Peter Demin / @peterdemin

07/15/2019 at 01:16PM

16
#217 - Joe Fahnestock🌵 / @Joecupojoe

07/23/2019 at 03:34PM

16
#218 - Matt Vaughn / @mattttvaughn

07/29/2019 at 01:46PM

16
#219 - Chloe Adeline / @SimpleRabbit

08/04/2019 at 03:23AM

16
#220 - theBecwar / @thebecwar

08/18/2019 at 05:55PM

16
#221 - vimRunnerUp3000 / @VUp3000

09/02/2019 at 07:08PM

16
#222 - Alan Martins Silva / @alanfortlink

09/12/2019 at 08:10PM

16
#223 - Yannick Gladow / @y_gldw

09/17/2019 at 02:59PM

16
#224 - Brandon Harrison / @llAboutB

09/24/2019 at 05:31PM

16
#225 - oldandslow / @oldandslow5

11/26/2019 at 06:42PM

16
#226 - Lion de Bell / @CLGBamboo

12/01/2019 at 06:33PM

16
#227 - samuel norbury / @SnNorbury

12/15/2019 at 12:23PM

16
#228 - hokonch / @hokonch

01/05/2020 at 01:47AM

16
#229 - JimmyGymglish / @JGymglish

01/07/2020 at 02:15PM

16
#230 - beew71493 / @beew71493

01/11/2020 at 05:16AM

16
#231 - Thomas Jung / @ThomasAJung

01/21/2020 at 04:16PM

16
#232 - Pham Tuan Anh / @anhpt379

02/18/2020 at 03:46AM

16
#233 - BnnGolfer / @BnnGolfer

03/19/2020 at 11:53PM

16
#234 - せいほう / @FICSQF

04/22/2020 at 02:39AM

16
#235 - Nicolas Daval / @ndaval

04/30/2020 at 01:07PM

17
#236 - Oka / @the_white_oak

08/11/2018 at 04:51PM

17
#237 - _Tpouhuk / @Tpouhuk2

08/11/2018 at 05:29PM

17
#238 - Jan Bundesmann / @janbundesmann

08/13/2018 at 08:59AM

17
#239 - Vova Blet / @VovaBlet

08/21/2018 at 08:17PM

17
#240 - Jorge / @jherreso

09/02/2018 at 05:06AM