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

189 active golfers, 905 entries

Leaderboard (lowest score wins):
45
#151 - Justin Haaheim / @justinhaaheim

02/18/2022 at 11:55AM

47
#152 - Andreas Aumann / @andreasaumann

03/20/2022 at 07:33PM

48
#153 - Chris Milson / @_shlappas

11/06/2021 at 09:24PM

48
#154 - nico yazawa / @yazawa268

01/30/2022 at 02:49AM

49
#155 - Chun Chanjun / @CChanjun

03/23/2022 at 12:33PM

53
#156 - Ankit Aabad / @AabadAnkit

10/17/2021 at 07:01AM

53
#157 - Avery Carty / @AveryCarty

12/30/2021 at 04:31AM

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

10/30/2021 at 09:40PM

54
#159 - Simon / @mopsdiv

11/07/2021 at 12:10PM

54
#160 - Peter Szerzo / @peterszerzo

07/04/2023 at 03:26PM

55
#161 - anonymouse / @anonymo65837183

04/06/2022 at 03:59AM

55
#162 - Nick Salesky / @NickSalesky

08/13/2022 at 04:15AM

55
#163 - Ratkovszki István / @RatkovszkiIstvn

09/08/2022 at 09:08PM

56
#164 - nayan / @rednayan

10/29/2021 at 07:20AM

57
#165 - ohwell / @KiranClose

07/31/2022 at 12:33PM

59
#166 - Dank City / @ddankcity

12/09/2022 at 05:38PM

60
#167 - jackson / @bearahuman

04/21/2023 at 03:15PM

61
#168 - Emiliano Pérez / @emiperez95

12/31/2021 at 03:29PM

66
#169 - rakshith 🦄 / @rakshithbellare

12/28/2021 at 12:54PM

66
#170 - サイシ / @tairar_314

06/09/2022 at 06:56AM

69
#171 - Seok Hwan Kim / @gworldkim

10/23/2023 at 02:34PM

70
#172 - Daniel Mota / @danielmotaa11

06/01/2022 at 04:21PM

70
#173 - xtncl / @xtncl

06/10/2022 at 10:50PM

72
#174 - rdbt / @rdbtrd

11/30/2021 at 08:28PM

72
#175 - oleg / @oleg12573505

01/29/2022 at 02:25PM

74
#176 - Digang's 트위터 / @Digang_e

03/23/2022 at 05:49AM

75
#177 - Patricio Arluciaga 🌳 / @parluciaga

10/22/2021 at 04:08PM

77
#178 - Sopol / @sopolenius

10/19/2021 at 04:48PM

80
#179 - Andrewana / @andrewanachan

02/13/2022 at 05:12AM

80
#180 - -MbirkO- / @MbirkO3

03/06/2022 at 04:21PM