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

293 active golfers, 1301 entries

Leaderboard (lowest score wins):
25
#61 - rkucsora / @rkucsora

05/08/2026 at 05:36PM

25
#62 - Ruslan Sayfutdinov / @KapJI

05/17/2026 at 08:27PM

25
#63 - raylmorris / @raylmorris

06/15/2026 at 04:31AM

25
#64 - Ben Blute / @benblute

06/24/2026 at 09:04AM

25
#65 - Oliver Novák / @doggopwn

08/18/2026 at 09:18PM

25
#66 - GuyegOOd / @GuyegOOd

09/10/2026 at 12:58AM

26
#67 - “Smylers” / @Smylers2

07/04/2025 at 03:02PM

26
#68 - Egor Derevlev / @Neofuturist

07/04/2025 at 03:35PM

26
#69 - greg-asc / @greg-asc

07/12/2025 at 08:55PM

26
#70 - danieltanto / @danieltanto

08/05/2025 at 02:56AM

26
#71 - Fulvio Casali / @fulv

08/09/2025 at 05:21PM

26
#72 - Todd Bryant / @toddbryant

08/14/2025 at 07:47PM

26
#73 - langsjo / @langsjo

08/19/2025 at 06:25PM

26
#74 - Benjamin Urrutia / @benjaurr

08/31/2025 at 07:04PM

26
#75 - MartinDanesh / @MartinDanesh

09/12/2025 at 08:36PM

26
#76 - Oleksii Tkachenko / @orbital17

10/03/2025 at 10:30AM

26
#77 - Arzar / @Arzar

10/16/2025 at 09:20AM

26
#78 - dbil25 / @dbil25

10/22/2025 at 09:31PM

26
#79 - Dmitry Prytkov / @hayer969

10/25/2025 at 01:01PM

26
#80 - Jesper Kristiansson / @jesperkristiansson

10/29/2025 at 12:00PM

26
#81 - yaskur0 / @yaskur0

11/05/2025 at 06:04AM

26
#82 - Jakub Adler / @jakubadler

11/06/2025 at 08:40PM

26
#83 - Tim Rutter / @timrutter

11/25/2025 at 03:53PM

26
#84 - Zhener / @Zhen3r

12/19/2025 at 07:44AM

26
#85 - Doxly / @Doxly

01/15/2026 at 08:57AM

26
#86 - Deniz Bueno / @denizbueno

02/21/2026 at 01:48AM

26
#87 - Timothy Dock / @TheSupremeCoder

03/21/2026 at 12:55AM

26
#88 - Rainault / @Rainault

04/13/2026 at 04:49PM

26
#89 - nicolas / @cnbaird

06/14/2026 at 05:00PM

27
#90 - Cameron Wolfe / @Camty1

07/04/2025 at 11:41PM