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):
15
#151 - T A / @SirAviles

02/18/2019 at 08:27PM

15
#152 - Roger Stoltz / @rogsto1

02/28/2019 at 04:42PM

15
#153 - Francisco Esteve / @San475

03/11/2019 at 06:12AM

15
#154 - chenqiqi / @chenqiqi13

03/12/2019 at 01:30PM

15
#155 - enji / @enji_ja

03/18/2019 at 06:39PM

15
#156 - Mark Stillwell / @marklee77

04/06/2019 at 08:39PM

15
#157 - Gitsnik / @dracyrys

04/21/2019 at 12:29PM

15
#158 - Raul / @Raul50174499

04/23/2019 at 10:50AM

15
#159 - arsi arola / @mos_kiitto

06/24/2019 at 07:34PM

15
#160 - Chester Yap / @Chest_ErYap

07/11/2019 at 04:17AM

15
#161 - Joel Elkins / @dice_tea

08/03/2019 at 09:48PM

15
#162 - Adam Hartz / @awareofnow

08/22/2019 at 02:15AM

15
#163 - 波波 / @sbob87

08/26/2019 at 08:38AM

15
#164 - Marco Mannucci / @markomannux

08/26/2019 at 12:52PM

15
#165 - Christian / @paierlep

08/31/2019 at 08:14PM

15
#166 - Baine Wedlock / @BaineWedlock

09/12/2019 at 11:38AM

15
#167 - Benoit Benoit / @Benoit_Tgt

09/12/2019 at 12:25PM

15
#168 - Abner jr / @Abnerjr19

09/21/2019 at 04:39PM

15
#169 - Miko / @_m_ik_o_

09/26/2019 at 04:23PM

15
#170 - Ivan Volosyuk / @IvanVolosyuk

10/21/2019 at 01:11PM

15
#171 - Volodymyr / @vkozach

12/01/2019 at 03:15PM

15
#172 - Michael Meixner / @meixner62

01/22/2020 at 06:12PM

15
#173 - Rune Warhuus / @DinkDonkNorway

01/23/2020 at 10:05AM

15
#174 - Jean-Francois Parent / @hacker_pyrat

02/07/2020 at 03:55PM

15
#175 - KingYames / @JamesZeHunter

02/25/2020 at 01:04PM

15
#176 - eshel / @EshelBM

02/28/2020 at 11:23AM

15
#177 - Paul Parker / @PaulDesmoParker

03/05/2020 at 01:00AM

15
#178 - floyd / @floyd10086

03/07/2020 at 07:05AM

15
#179 - Ryan Nevius / @ryannevius

03/18/2020 at 06:03AM

15
#180 - Jeff Cui / @jeffacce

05/13/2020 at 01:29AM