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 6 remaining solutions by signing in and submitting your own entry
#7 maharba6 / @maharba6 - Score: 64 - 10/03/24 @ 07:42
:set all&|1d|put='W10: Warning: Changing a readonly file'|1d|wq<CR>

0 comments


Created by: @maharba6

7 active golfers, 11 entries

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

11/01/2024 at 07:03AM

21
#2 - rasputins / @rasputins

10/15/2024 at 05:09AM

21
#3 - John Braxler / @braxler

10/17/2024 at 12:24PM

34
#4 - Brieuc Praud / @brieuc-praud

10/31/2024 at 09:50PM

53
#5 - Pablo Acuna / @pacuna

10/03/2024 at 05:40PM

53
#6 - got_windy / @insomnight

10/29/2024 at 12:31AM

64
#7 - maharba6 / @maharba6

10/03/2024 at 07:42AM