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

281 active golfers, 1261 entries

Leaderboard (lowest score wins):
77
#271 - ChessMartin / @ChessMartin

11/17/2025 at 10:01PM

78
#272 - James Appleton / @jmsapt

08/16/2025 at 12:56AM

80
#273 - Artem Tarasevich / @CheckSelfy

10/22/2025 at 04:55PM

82
#274 - Jesse / @Solopie

08/05/2025 at 04:31AM

87
#275 - donghwanjin / @donghwanjin

02/15/2026 at 01:46AM

91
#276 - David Martin Link / @DavidMLink

02/19/2026 at 04:10AM

104
#277 - EdgarQuinonez / @EdgarQuinonez

08/15/2025 at 04:25AM

114
#278 - Priyanshu Katuwal / @priyanshulxiv

12/05/2025 at 03:26AM

221
#279 - Encar Salazar / @nekomangini

03/30/2026 at 02:28AM

256
#280 - MirianGeronimo / @MirianGeronimo

04/23/2026 at 06:21AM

560
#281 - DuffyPoo / @DuffyPoo

01/23/2026 at 04:38PM