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

Change readonly files

Try to write a file that was marked as read-only.

Start file
# vim:ro:noma
End file
W10: Warning: Changing a readonly file

View Diff

1c1
< # vim:ro:noma
---
> W10: Warning: Changing a readonly 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 16 remaining solutions by signing in and submitting your own entry
#17 Dmytro Mavrov / @dinorry - Score: 71 - 03/31/25 @ 17:38
:<50-53>set all&|1d|put='W10: Warning: Changing a readonly file'|1d|wq<Esc>[201~<CR>

0 comments


Created by: @maharba6

17 active golfers, 49 entries

Leaderboard (lowest score wins):
20
#1 - Peppa Pig / @PeppaPigSg

11/01/2024 at 07:03AM

20
#2 - Wim Stockman / @wimstockman

11/15/2024 at 08:16AM

20
#3 - Danilo J. S. Bellini 🥊🇧🇷 / @danilobellini

12/01/2024 at 07:34PM

20
#4 - Alexander Cai / @adzcai

02/09/2025 at 05:22AM

20
#5 - Eran / @RedSponge

04/13/2025 at 03:16PM

21
#6 - rasputins / @rasputins

10/15/2024 at 05:09AM

21
#7 - John Braxler / @braxler

10/17/2024 at 12:24PM

21
#8 - Sonjiku / @sonjiku

11/05/2024 at 12:58AM

22
#9 - thedvd98 / @thedvd98

12/21/2024 at 10:16AM

34
#10 - Brieuc Praud / @brieuc-praud

10/31/2024 at 09:50PM

53
#11 - Pablo Acuna / @pacuna

10/03/2024 at 05:40PM

53
#12 - got_windy / @insomnight

10/29/2024 at 12:31AM

54
#13 - Elowen / @House-of-L

03/01/2025 at 08:31PM

55
#14 - editor3D / @editor3D

11/17/2024 at 10:15PM

60
#15 - eater.org / @nycksw

12/30/2024 at 12:48PM

64
#16 - maharba6 / @maharba6

10/03/2024 at 07:42AM

71
#17 - Dmytro Mavrov / @dinorry

03/31/2025 at 05:38PM