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

204 active golfers, 981 entries

Leaderboard (lowest score wins):
20
#31 - vuems / @vuems2win

11/17/2022 at 12:27AM

20
#32 - John Huynh / @huynh_j93

12/07/2022 at 07:25PM

20
#33 - fufuror / @futachima

01/30/2023 at 11:03AM

20
#34 - usermod / @g_usermod

02/06/2023 at 01:12AM

20
#35 - 马海洋 / @LG41bT7ZvqOdFl3

02/07/2023 at 07:07PM

20
#36 - くりち / 栗原佑弥 / @kurichi97

07/04/2023 at 05:15AM

20
#37 - b1gz / @_b1gz

07/26/2023 at 05:49PM

20
#38 - Topvimgolf Score / @topvimgolfscore

07/27/2023 at 09:31AM

20
#39 - Matthew Wilson / @spookypanda7

08/08/2023 at 05:13AM

20
#40 - moh ayaya / @AyayaMoh

08/23/2023 at 03:38PM

20
#41 - Monkey Boy / @monkey29089

09/26/2023 at 01:21PM

20
#42 - 7733865@qq.com / @tjxwg

10/17/2023 at 03:36PM

20
#43 - scpchicken / @scpchick

10/19/2023 at 05:29PM

20
#44 - Luoyb / @Luoyb

10/23/2023 at 12:15AM

20
#45 - tien / @tien40766111

11/14/2023 at 11:55AM

20
#46 - Druhan Shah / @DruhanShah

01/14/2024 at 08:17AM

20
#47 - Arey125 / @Arey125

02/04/2024 at 07:30PM

20
#48 - Anaritus / @Anaritus

02/24/2024 at 07:45PM

20
#49 - Aly Thobani / @alythobani

04/05/2024 at 12:22AM

21
#50 - Humbaba / @humbabu

12/31/2021 at 03:18PM

21
#51 - 勉强掩盖 / @NROOhu88PhVQYLT

01/13/2022 at 12:30PM

21
#52 - Даня Ефимов / @Abberatus

02/09/2022 at 06:17PM

21
#53 - blabla zincou / @BZincou

02/23/2022 at 09:39PM

21
#54 - Ramtin Martin / @martin_ramtin

03/25/2022 at 05:00AM

21
#55 - Youssef Magdy / @youssef_magdy29

04/28/2022 at 04:21AM

21
#56 - quemeraisc / @quemeraisc

05/03/2022 at 11:22AM

21
#57 - Irakli Chigvaria / @tchigvaria

05/13/2022 at 05:49AM

21
#58 - ShookerAndBeta / @Shooker2012

06/02/2022 at 04:44AM

21
#59 - redbigyesnoGoThenWhy / @redbigyesno

06/02/2022 at 12:32PM

21
#60 - Ivo Blöchliger / @aigledesalpes

06/07/2022 at 10:40AM