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

209 active golfers, 987 entries

Leaderboard (lowest score wins):
27
#121 - Will Long / @WillLon30283972

06/20/2022 at 03:27PM

27
#122 - Aarya / @aaryabhatia6

05/20/2023 at 02:13AM

27
#123 - Petr Hodač / @PetrHodac

08/28/2024 at 01:29PM

28
#124 - Johnnie Walker / @Johnnie11414500

04/15/2022 at 04:20PM

28
#125 - François / @mortyZZ

04/19/2022 at 04:35PM

29
#126 - Steve Wolligandt / @SteveWolligandt

12/07/2021 at 11:49AM

29
#127 - WhyIsThisFishInMyEar / @why_ear

01/15/2022 at 05:23PM

29
#128 - mariavimgolf / @mariavimgolf

01/16/2022 at 06:02PM

29
#129 - Gunter Kluge / @KlugeGunter

04/06/2022 at 03:44PM

29
#130 - Alex / @AlexanderHeatl2

07/07/2022 at 10:51PM

30
#131 - Jon Powers / @JonKPowers

10/27/2021 at 03:54PM

30
#132 - Paradoxskin / @paradoxskin

11/01/2021 at 09:13AM

30
#133 - A White Dwarf / @AWhiteDwarf1

12/03/2021 at 09:32PM

30
#134 - Der Natsch / @dernatsch

12/07/2021 at 02:14PM

30
#135 - Javier Contreras / @contranton

05/04/2022 at 01:49AM

30
#136 - Olivier Bégassat / @zk_evm

06/11/2023 at 02:15PM

31
#137 - Raiden di Rivia / @Raiden_di_Rivia

10/26/2021 at 11:01PM

31
#138 - thari.eth / @thari_eth

11/10/2021 at 02:06PM

31
#139 - Swaraj Dash / @swarajdash_

11/14/2021 at 10:37PM

31
#140 - Justin / @jtmusky

02/19/2022 at 08:44PM

31
#141 - rr / @rodgeur31

03/28/2022 at 09:53PM

31
#142 - e_e / @eleloi

02/10/2023 at 09:37PM

32
#143 - Cesare Tagliaferri / @taglia

11/20/2021 at 12:46PM

32
#144 - Matthias Bartsch 🏠 / @MBartsch

02/21/2022 at 02:49PM

32
#145 - Timothy Michael Fox / @Timothy_M_Fox

02/21/2022 at 06:03PM

32
#146 - rnakai / @rnakai_42

03/28/2022 at 08:33AM

32
#147 - 0xf00ff00f / @0xf00ff00f

12/13/2022 at 08:17PM

33
#148 - Van / @dangtrivan15

09/24/2022 at 08:19AM

34
#149 - PL Siddharth / @Havok1993

06/30/2022 at 11:53AM

36
#150 - Sergio / @SergioVl12

03/20/2023 at 08:46AM