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

Replace markdown sections with numbering

Replace each section and subsection with their respective numbers

Start file
# Main Topics
## History
## Science
## Literature
## Mathematics
## Philosophy
## Psychology
# Additional Resources
# Community Guidelines
## Rules
## Moderation
## Code of Conduct
# Get Started
## Quick Tutorial
## FAQ
End file
1 Main Topics
1.1 History
1.2 Science
1.3 Literature
1.4 Mathematics
1.5 Philosophy
1.6 Psychology
2 Additional Resources
3 Community Guidelines
3.1 Rules
3.2 Moderation
3.3 Code of Conduct
4 Get Started
4.1 Quick Tutorial
4.2 FAQ

View Diff

1,15c1,15
< # Main Topics
< ## History
< ## Science
< ## Literature
< ## Mathematics
< ## Philosophy
< ## Psychology
< # Additional Resources
< # Community Guidelines
< ## Rules
< ## Moderation
< ## Code of Conduct
< # Get Started
< ## Quick Tutorial
< ## FAQ
---
> 1 Main Topics
> 1.1 History
> 1.2 Science
> 1.3 Literature
> 1.4 Mathematics
> 1.5 Philosophy
> 1.6 Psychology
> 2 Additional Resources
> 3 Community Guidelines
> 3.1 Rules
> 3.2 Moderation
> 3.3 Code of Conduct
> 4 Get Started
> 4.1 Quick Tutorial
> 4.2 FAQ

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 76 remaining solutions by signing in and submitting your own entry
#77 CannellC / @CannellC - Score: 983 - 10/25/24 @ 04:20
:g/##<BS><BS><BS><BS>^<BS>%s/^/\=line(.)\<BS>/<CR>:<Up><Left><Left><Left>'<Right>'<CR><fd-6b><CR><fd-6b>u<C-R><Up>u:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>.<CR><fd-6b><fd-6b>kkkkkkkkkkkkkkjjjjjjjjjjkkkjjjjjjjj<fd-6b>uuuuuu<50-53>:let i=1 | %s/^./\=i/ | let i+=1<Esc>[201~`<fd-6b>u:<50-53>:let i=1 | %s/^./\=i/ | let i+=1<Esc>[201~<CR><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><fd-6b>u:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><CR><fd-6b>u:<Up><Up><Up><CR><Up><Up><Up><Up><Up><Up><Up><Up><Down><Down><Down><Down><Down><Down><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Down><Down><Down><Down><Down><50-53>:<50-53>function! A(m)<Esc>[201~<CR>if a:m=='<BS>"#"<CR>let g:i=g:i+1<CR>let g:j=0<CR>return g:i<CR>else<CR>let g:j=g:j+1<CR>return g:i.'.'.g:j<CR>endif<CR>endfunction<CR>:<50-53>let i=0|g/^#\+/s//\=A(submatch(0))/<Esc>[201~<CR>Z::wq<CR><NL><Esc>[201~u:<50-53>:<50-53>function! A(m)<Esc>[201~<CR>if a:m=='<BS>"#"<CR>let g:i=g:i+1<CR>let g:j=0<CR>return g:i<CR>else<CR>let g:j=g:j+1<CR>return g:i.'.'.g:j<CR>endif<CR>endfunction<CR>:<50-53>let i=0|g/^#\+/s//\=A(submatch(0))/<Esc>[201~<CR>Z::wq<CR><NL><Esc>[201~<CR><fd-6b><fd-6b>kj:<BS><fd-6b>:<BS><fd-6b><fd-6b><fd-6b><fd-6b>k<C-V>kkk<fd-6b>lljjhhuiuuu<BS><BS><fd-6b>uuuuuujjjjVkkkkkjjjjVkkkkkjjkkk<C-V>7jkr18jkr2jr3j<C-V>2jr33jr4jr4jr4lk<C-V>jI.<fd-6b>l<C-V>j<C-A><C-V>jr<C-A>ur1jr210k3kh<C-V>jjjjjI.<fd-6b>lgvl<fd-6b><C-V>kkkkk<fd-6b>r1jr2jr2r2jkr3jr4jr5jr5r6jjjh<C-V>jjI.<fd-6b>lr1jr2jr3:w<CR>:q<CR>

0 comments


Created by: @pacuna

77 active golfers, 296 entries

Leaderboard (lowest score wins):
29
#1 - Danilo J. S. Bellini 🥊🇧🇷 / @danilobellini

11/20/2024 at 06:58PM

29
#2 - Peppa Pig / @PeppaPigSg

01/16/2025 at 07:31AM

29
#3 - Vsevolod Rychkov / @MadPigeon

09/24/2025 at 07:37AM

30
#4 - John Braxler / @braxler

11/13/2024 at 03:22PM

30
#5 - jimmymills / @jimmymills

05/12/2025 at 01:45PM

30
#6 - Kelvinauta / @kelvinauta

08/01/2025 at 05:20AM

30
#7 - Pierre Senellart / @PierreSenellart

08/05/2025 at 08:29AM

30
#8 - petr-kx / @petr-kx

08/18/2025 at 06:08PM

30
#9 - Berel94 / @Berel94

10/16/2025 at 09:06PM

35
#10 - ProGamerYeet / @ProGamerYeet

10/23/2024 at 02:40PM

35
#11 - MatFriend / @MatFriend

10/25/2024 at 01:31AM

35
#12 - got_windy / @insomnight

10/28/2024 at 06:17AM

35
#13 - dlum20 / @dlum20

10/29/2024 at 05:40AM

35
#14 - Hiroshi Yamamoto / @hyamamoto

11/07/2024 at 02:25AM

35
#15 - M S Dheeraj Murthy / @Dheeraj-Murthy

11/11/2024 at 10:30AM

35
#16 - Hessesian / @Hessesian

06/18/2025 at 07:07AM

35
#17 - Dmitry Prytkov / @hayer969

10/24/2025 at 11:45PM

35
#18 - Gavin / @GavinKoeng

11/27/2025 at 07:26AM

38
#19 - timonjamjam1 / @timonjamjam1

10/24/2024 at 10:09PM

38
#20 - Anton Strand / @AntonStrand

11/01/2024 at 09:04AM

38
#21 - Wim Stockman / @wimstockman

11/09/2024 at 09:54PM

40
#22 - yexia0 / @yexia0

11/07/2024 at 02:25PM

45
#23 - MartnRamtin / @MartnRamtin

01/31/2025 at 04:54PM

48
#24 - Brieuc Praud / @brieuc-praud

10/31/2024 at 08:42PM

48
#25 - Swaraj Dash / @swarajdash

12/20/2025 at 11:42PM

53
#26 - ShookerAndBeta / @Shooker2012

10/29/2024 at 10:05AM

53
#27 - phaym / @phaym

10/12/2025 at 05:48PM

53
#28 - Whitaker Trebella / @wtrebella

01/10/2026 at 09:02PM

54
#29 - Anton de Regt / @antonderegt

10/24/2024 at 08:45AM

54
#30 - Kristóf Cserpes / @KriCse

10/28/2024 at 08:53AM