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

Wikitext headings to markdown

Convert the wikitext headings to markdown.

Start file
= First, a heading =
== Section ==
=== Deeper ===

As you can see, the headings have equals signs like =
in all kinds of funny places.

== Dets ==
Why not = this here.

```
var = 4

def funcy(min=1, max=2):
  return (min + max) / 2
```

=== Also ===
Please note.  Thanks.
End file
# First, a heading
## Section
### Deeper

As you can see, the headings have equals signs like =
in all kinds of funny places.

## Dets
Why not = this here.

```
var = 4

def funcy(min=1, max=2):
  return (min + max) / 2
```

### Also
Please note.  Thanks.

View Diff

1,3c1,3
< = First, a heading =
< == Section ==
< === Deeper ===
---
> # First, a heading
> ## Section
> ### Deeper
8c8
< == Dets ==
---
> ## Dets
18c18
< === Also ===
---
> ### Also

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 79 remaining solutions by signing in and submitting your own entry
#80 Antse / @antse_fr - Score: 182 - 11/08/21 @ 18:39
:%s<0xc2><0xa8><BS>/^=<BS><BS>=<Left>^<Right>/<Left><Left>.<BS>*<BS>1<BS><Right> <Right>#/g<CR>:<Up><Left><Left><Left><Left><Left>=<Right><Right><Right><Right><Left>#<CR>uuu:%s/<0xc2><0xa8><BS>^# <Left><BS>= $ =<Left><Left><Left><Right><Right><Right><BS><BS><BS><BS> /<Left>:<BS><Right># /g<CR>:<Up><Left><Left><Left><Left><Left><Left><Left>=<Right><Right><Right>#<CR>:<Up><Left><Left><Left><Left><Left><Left><Left><Left>=<Right><Right><Right><Right>#<CR>:%s/$=<BS><Left>= <BS><Left> <Right><Right>//g<Left><Left><Left><Left><Left><Left><Left><Left><BS>A<BS>1<CR>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><BS>%<Right><Right><Right><Right>=<CR>:<Up><Left><Left><Left><Left>=<CR>:w<CR>:q<CR>

0 comments


Created by: @vimgolfleo1

80 active golfers, 302 entries

Leaderboard (lowest score wins):
37
#61 - леди питон / @SofiaLadyPython

10/24/2021 at 10:46PM

39
#62 - 关红伟 / @speed2exe

10/25/2021 at 04:47PM

42
#63 - nutcracker goblin / @tamalefencer

11/20/2021 at 12:56AM

45
#64 - SwordSwordSwordBird / @SwordSwordBird

11/13/2021 at 06:38AM

48
#65 - Chris Milson / @_shlappas

11/06/2021 at 09:24PM

53
#66 - Ankit Aabad / @AabadAnkit

10/17/2021 at 07:01AM

53
#67 - Avery Carty / @AveryCarty

12/30/2021 at 04:31AM

54
#68 - Олександр Євтушенко / @oyevtushe

10/30/2021 at 09:40PM

54
#69 - Simon / @mopsdiv

11/07/2021 at 12:10PM

56
#70 - nayan / @rednayan

10/29/2021 at 07:20AM

61
#71 - Emiliano Pérez / @emiperez95

12/31/2021 at 03:29PM

66
#72 - rakshith 🦄 / @rakshithbellare

12/28/2021 at 12:54PM

72
#73 - rdbt / @rdbtrd

11/30/2021 at 08:28PM

75
#74 - Patricio Arluciaga / @parluciaga

10/22/2021 at 04:08PM

77
#75 - Sopol / @sopolenius

10/19/2021 at 04:48PM

91
#76 - J Berc / @Jberczel

11/05/2021 at 10:29PM

92
#77 - Lucas Monteiro / @lhtmonteiro

11/02/2021 at 10:18PM

96
#78 - Lee Wei / @leewei666

10/15/2021 at 05:30PM

175
#79 - Ricardo Yrupailla / @STG10101

01/07/2022 at 11:13PM

182
#80 - Antse / @antse_fr

11/08/2021 at 06:39PM