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

61 active golfers, 205 entries

Leaderboard (lowest score wins):
65
#31 - thedvd98 / @thedvd98

11/09/2024 at 03:27PM

69
#32 - beethovn1204 / @beethovn1204

12/27/2024 at 03:37PM

73
#33 - Meya / @meya-zhao

11/19/2024 at 11:34AM

73
#34 - Shan / @NanShanFish

11/29/2024 at 03:12PM

76
#35 - Ivan Prikaznov / @Prikaz98

11/01/2024 at 11:28PM

79
#36 - Doug Chan / @Coufu

10/27/2024 at 05:51PM

80
#37 - Frédéric Heulin / @talineo

12/28/2024 at 08:56PM

81
#38 - aaay-aaay / @aaay-aaay

10/25/2024 at 04:21PM

82
#39 - Ban / @Rheriel

10/23/2024 at 07:24AM

84
#40 - ramacassis / @ramacassis

04/15/2025 at 11:02PM

90
#41 - editor3D / @editor3D

11/15/2024 at 11:46PM

91
#42 - tokaku / @hiroshi-tkk

11/19/2024 at 03:42AM

94
#43 - Sjur B. / @Apostrophel

05/12/2025 at 10:07PM

97
#44 - Yushan Zhang / @ElephantZhang

11/19/2024 at 03:45AM

99
#45 - rybenmensch / @rybenmensch

04/17/2025 at 02:08PM

101
#46 - BasicLoco / @BasicLoco

10/28/2024 at 12:02PM

101
#47 - cr100 / @rekicc

11/06/2024 at 01:58PM

101
#48 - Batyr Asadullin / @Sengoku11

12/14/2024 at 12:58PM

102
#49 - cuhauw / @cuhauwhung

11/19/2024 at 03:24AM

108
#50 - SRINIVASU SALADI / @SRINIVASUS22587

03/14/2025 at 06:35AM

109
#51 - Yining Chen / @wekantakabotdis

04/16/2025 at 05:27AM

110
#52 - Justin Fisher / @justinfisherr

11/01/2024 at 04:52PM

110
#53 - Pewogtz / @Pewogtz

05/27/2025 at 08:18PM

120
#54 - Fredrik Robertsen / @fredrikr79

10/25/2024 at 02:47PM

122
#55 - Ayon Pal / @AyonPal

04/21/2025 at 08:49AM

123
#56 - David Millman / @dlmillman

10/27/2024 at 04:31PM

124
#57 - Ming / @x51ming

04/20/2025 at 01:29PM

164
#58 - dailybeef / @dailybeef

11/30/2024 at 01:51PM

178
#59 - fengc / @fengc

10/23/2024 at 04:42AM

208
#60 - boumediane1 / @boumediane1

01/09/2025 at 10:01PM