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

215 active golfers, 932 entries

Leaderboard (lowest score wins):
25
#31 - Thomas Kolar / @ralokt

11/17/2025 at 09:44PM

25
#32 - Casey O'Donnell / @CaseyOD15519082

11/22/2025 at 07:57PM

25
#33 - Jan Bellon / @janbellon

12/03/2025 at 11:29PM

25
#34 - Jan Tesař / @tesar-tech

12/04/2025 at 12:28PM

25
#35 - Lennart / @lennartack

12/07/2025 at 05:31PM

25
#36 - bcollins19 / @bcollins19

12/17/2025 at 05:44PM

25
#37 - heam9 / @heam9

12/19/2025 at 03:36PM

25
#38 - Harun Koç / @Wueenzy

12/19/2025 at 05:21PM

25
#39 - Martin Georgiev / @martician1

12/20/2025 at 02:26PM

25
#40 - Jens Wilbert / @dragontec12

12/21/2025 at 01:24PM

25
#41 - zirb / @zirb

12/24/2025 at 10:35PM

25
#42 - Konrad Guzek / @kguzek

12/24/2025 at 11:43PM

25
#43 - Michael Brauweiler / @rattletat

12/26/2025 at 03:38PM

25
#44 - Jon Krause / @jkrause314

12/31/2025 at 03:15AM

25
#45 - ぽんぺい / @shikanoeiyu

01/02/2026 at 11:31AM

25
#46 - Nahuel Pacheco (NaP) / @Nahuel2998

01/31/2026 at 02:15AM

25
#47 - maksim-pinguin / @maksim-pinguin

02/10/2026 at 09:09AM

25
#48 - HRyuT / @HRyuT

02/14/2026 at 05:57AM

25
#49 - Joseph Peters / @petersjl

02/19/2026 at 09:20PM

25
#50 - Martin / @mpodhaisky

02/26/2026 at 03:20PM

26
#51 - “Smylers” / @Smylers2

07/04/2025 at 03:02PM

26
#52 - Egor Derevlev / @Neofuturist

07/04/2025 at 03:35PM

26
#53 - greg-asc / @greg-asc

07/12/2025 at 08:55PM

26
#54 - danieltanto / @danieltanto

08/05/2025 at 02:56AM

26
#55 - Fulvio Casali / @fulv

08/09/2025 at 05:21PM

26
#56 - Todd Bryant / @toddbryant

08/14/2025 at 07:47PM

26
#57 - langsjo / @langsjo

08/19/2025 at 06:25PM

26
#58 - Benjamin Urrutia / @benjaurr

08/31/2025 at 07:04PM

26
#59 - MartinDanesh / @MartinDanesh

09/12/2025 at 08:36PM

26
#60 - Oleksii Tkachenko / @orbital17

10/03/2025 at 10:30AM