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

548 active golfers, 2395 entries

Leaderboard (lowest score wins):
14
#91 - Ebi / @ehan6

08/01/2020 at 02:10PM

14
#92 - Theo Sarrazin / @tshaero

08/19/2020 at 09:20AM

14
#93 - Tanzeel Kazi / @tanzeelkazi

08/22/2020 at 10:06PM

14
#94 - Ivan Kwong / @IvanKwong5

10/02/2020 at 03:04PM

14
#95 - lamtt77 / @lamtt77

10/10/2020 at 02:48AM

14
#96 - vim-golf-requirement / @VRequirement

10/16/2020 at 03:50PM

14
#97 - Ifeoluwa Lawal / @IfeLawl

10/16/2020 at 03:52PM

14
#98 - Ravi S Sinha / @ambidextrousTx

10/19/2020 at 11:41PM

14
#99 - moh ayaya / @AyayaMoh

11/07/2020 at 07:16PM

14
#100 - hepebexè / @hepebexe

11/30/2020 at 07:06PM

14
#101 - Jung Yeon Park / @park_jungy

01/03/2021 at 08:48PM

14
#102 - A A A / @37fatos

01/09/2021 at 07:11PM

14
#103 - Andreas Siegrist / @andreaszwei

01/22/2021 at 01:33PM

15
#104 - Jon Krause / @jkrause314

08/11/2018 at 05:14PM

15
#105 - Kerson Hsiao / @KersonHsiao

08/12/2018 at 12:47AM

15
#106 - Smylers / @Smylers2

08/12/2018 at 08:54PM

15
#107 - Charles Sun / @charles_sun90

08/13/2018 at 09:48PM

15
#108 - testingvimgolf / @testingvimgolf

08/14/2018 at 03:20AM

15
#109 - Keldwik Chaldain / @Suskeyhose

08/14/2018 at 07:59PM

15
#110 - 徐学健 / @zebrallel

08/15/2018 at 01:58AM

15
#111 - Søren Kjeil / @sfkjeil

08/15/2018 at 09:09AM

15
#112 - Simon Ingelsson / @_DeVVaN_

08/15/2018 at 12:19PM

15
#113 - Andre Cato / @DreBear800

08/18/2018 at 01:19AM

15
#114 - Тёма / @Timon_Surikat

08/18/2018 at 02:32PM

15
#115 - Rajesh Sharma / @deepredsky

08/18/2018 at 05:35PM

15
#116 - Sergio / @voyeg3r

08/19/2018 at 03:29PM

15
#117 - Coruja Queridinha / @miriamretka

08/19/2018 at 08:43PM

15
#118 - Hugo / @szeyattai

08/25/2018 at 06:50AM

15
#119 - A Programmer / @hlprogrammer

08/26/2018 at 12:13PM

15
#120 - Chi Jun / @jun13blu

08/28/2018 at 06:28AM