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 by @xzzhiao:

Unlock 10 remaining solutions by signing in and submitting your own entry
Created by: @vimgolfleo1

158 active golfers, 716 entries

Solutions by @xzzhiao:
20
#20 - John Xu / @xzzhiao

04/06/2022 at 01:58AM

21
#>38 - John Xu / @xzzhiao

04/06/2022 at 01:57AM

22
#>64 - John Xu / @xzzhiao

04/06/2022 at 01:57AM

23
#>71 - John Xu / @xzzhiao

04/06/2022 at 01:56AM

24
#>74 - John Xu / @xzzhiao

04/06/2022 at 01:55AM

25
#>80 - John Xu / @xzzhiao

04/06/2022 at 01:53AM

26
#>83 - John Xu / @xzzhiao

04/06/2022 at 01:52AM

27
#>90 - John Xu / @xzzhiao

04/06/2022 at 01:51AM

29
#>96 - John Xu / @xzzhiao

04/06/2022 at 01:48AM

66
#>139 - John Xu / @xzzhiao

04/06/2022 at 01:43AM