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 9v00686695ea000000000723

From brakets to parens

This is one of the most common problem when you wrap an array for error handling. Vim is useful when you convert foo[i][j][k] into foo(i, j, k) for many times.

Start file
int main() {
	glm::vec3 umax(
		(vx[i+1][j][k]-vx[i][j][k])/2,
		(vy[i][j+1][k]-vy[i-1][j+1][k])/2,
		(vz[i][j][k+1]-vz[i-1][j][k+1])/2
	);
	glm::vec3 umin(
		(m_vx[i][j][k]-m_vx[i-1][j][k])/2,
		(m_vy[i][j][k]-m_vy[i-1][j][k])/2,
		(m_vz[i][j][k]-m_vz[i-1][j][k])/2
	);
}
End file
int main() {
	glm::vec3 umax(
		(vx(i+1, j, k)-vx(i, j, k))/2,
		(vy(i, j+1, k)-vy(i-1, j+1, k))/2,
		(vz(i, j, k+1)-vz(i-1, j, k+1))/2
	);
	glm::vec3 umin(
		(m_vx(i, j, k)-m_vx(i-1, j, k))/2,
		(m_vy(i, j, k)-m_vy(i-1, j, k))/2,
		(m_vz(i, j, k)-m_vz(i-1, j, k))/2
	);
}

View Diff

1d0
< 
4,6c3,5
< 		(vx[i+1][j][k]-vx[i][j][k])/2,
< 		(vy[i][j+1][k]-vy[i-1][j+1][k])/2,
< 		(vz[i][j][k+1]-vz[i-1][j][k+1])/2
---
> 		(vx(i+1, j, k)-vx(i, j, k))/2,
> 		(vy(i, j+1, k)-vy(i-1, j+1, k))/2,
> 		(vz(i, j, k+1)-vz(i-1, j, k+1))/2
9,11c8,10
< 		(m_vx[i][j][k]-m_vx[i-1][j][k])/2,
< 		(m_vy[i][j][k]-m_vy[i-1][j][k])/2,
< 		(m_vz[i][j][k]-m_vz[i-1][j][k])/2
---
> 		(m_vx(i, j, k)-m_vx(i-1, j, k))/2,
> 		(m_vy(i, j, k)-m_vy(i-1, j, k))/2,
> 		(m_vz(i, j, k)-m_vz(i-1, j, k))/2
13c12
< }
\ No newline at end of file
---
> }

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 183 remaining solutions by signing in and submitting your own entry
#184 DuffyPoo / @DuffyPoo - Score: 560 - 01/23/26 @ 16:38
jjjklllllllllllljxi(<Esc>llllxxi, <Esc>llxxi, <Esc>llxi)<Esc>llllxi(<Esc>lllhxxi, <Esc>llxxi, <Esc>llxi)<Esc>jhhhhhhhhhhhhhhhhhhhhhhxi(<Esc>llxxi, <Esc>llllxxi, <Esc>llxi)x<BS><Esc>llllxi(<Esc>llllxxi, <Esc>llllxxi, <Esc>llxii<BS>)<Esc>jhhhhhhhhhhhhhhhhhhhhhhhhhhxi(<Esc>llxxx<Esc>ui, <Esc>llxxi, <Esc>llllxi)<Esc>llllxi(<Esc>llllxxi, <Esc>llxxi, <Esc>llllxi)<Esc>jjjhhhhhhhhhhhhhhhhhhhhhhhhhlxi(x<BS><Esc>llxxi, <Esc>llxxi, <Esc>llxi)<Esc><Esc>llllllxi(<Esc>llllxxi, <Esc>lllhxxi, <Esc>llxi)<Esc>jhhhhhhhhhhhhhhhhhhhhhhhhxi(<Esc>llxxi, <Esc>llxxi, <Esc>llxi)<Esc>llllllxi(<Esc>llllxxi<<BS>, <Esc>llxxi, <Esc>llxi)<Esc>jjkkhhhhhhhhhhhhhhhhhhhhhhhhjxi(<Esc>llxxi, <Esc>llxxi, <Esc>lllhxi,<BS>)<Esc>llllllxi(<Esc>llllxxi, <Esc>llxxi, <Esc>lllhxi)<Esc>kkkkkkkkkkkkkkkkkkddjl:wq<CR>

0 comments


Created by: @mirroris

184 active golfers, 807 entries

Leaderboard (lowest score wins):
26
#61 - Jakub Adler / @jakubadler

11/06/2025 at 08:40PM

26
#62 - Tim Rutter / @timrutter

11/25/2025 at 03:53PM

26
#63 - Zhener / @Zhen3r

12/19/2025 at 07:44AM

26
#64 - Doxly / @Doxly

01/15/2026 at 08:57AM

27
#65 - Cameron Wolfe / @Camty1

07/04/2025 at 11:41PM

27
#66 - lairdstewart / @lairdstewart

07/15/2025 at 02:03AM

27
#67 - Mikhail Lavrentiev / @lavrentievms

01/07/2026 at 09:34PM

28
#68 - Maximilian Ballard / @ediw8311xht

07/04/2025 at 09:00PM

28
#69 - Mostafa Kashwaa / @MostafaKashwaa

07/10/2025 at 07:14AM

28
#70 - Zach McKenna / @zcmckenna

07/10/2025 at 01:00PM

28
#71 - Håkon Anders Strømsodd / @haakon8855

08/13/2025 at 02:17PM

29
#72 - Ozan / @OzanY4

07/16/2025 at 08:43PM

30
#73 - Ming / @x51ming

07/10/2025 at 11:11AM

31
#74 - LunaSakura / @Luna5akura

11/13/2025 at 08:24AM

32
#75 - Martin Harvan / @martinhrvn

10/31/2025 at 09:07PM

33
#76 - mintonofall / @mintonofall

12/30/2025 at 05:15AM

34
#77 - Bthxtly / @Bthxtly

07/15/2025 at 08:13AM

34
#78 - Benjamin / @b2vqbw

07/16/2025 at 02:47AM

34
#79 - Isaac Salzman / @Czensored

07/17/2025 at 09:18AM

34
#80 - eastaveracruz / @eastaveracruz

11/05/2025 at 04:58PM

34
#81 - Sjur B. / @Apostrophel

12/15/2025 at 01:12PM

34
#82 - shooker2012 / @shooker2012

01/06/2026 at 03:07AM

34
#83 - Purple-Chicken / @Purple-Chicken

01/23/2026 at 04:37AM

35
#84 - raffaele-99 / @raffaele-99

08/05/2025 at 01:19AM

35
#85 - smh62 / @smh62

08/07/2025 at 08:35AM

35
#86 - hundertzwoelf / @hundertzwoelf

08/13/2025 at 01:08PM

35
#87 - Jay Bowers / @jaybowers

08/14/2025 at 03:42PM

35
#88 - ing_BE | 잉비 / @ingBE2

08/24/2025 at 01:33PM

35
#89 - Charlie Collard / @charlie-collard

08/28/2025 at 10:52AM

35
#90 - ak@developer / @Ajay-056

08/31/2025 at 02:11PM