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

157 active golfers, 709 entries

Leaderboard (lowest score wins):
22
#61 - deusthe / @deusthe91

12/20/2021 at 02:27PM

22
#62 - Sergey Ryabko / @sergey_ryabko

01/17/2022 at 03:49PM

22
#63 - POSIX / @po6ix

02/01/2022 at 04:23AM

22
#64 - pusha t daily / @rudellius

04/08/2022 at 09:58PM

22
#65 - Gen / @gen_f_74

05/18/2022 at 12:30AM

23
#66 - mevmev / @mevmev8

10/23/2021 at 04:42PM

23
#67 - auruby / @HenGreneggs

11/02/2021 at 02:23AM

23
#68 - Milovan Zogovic / @zogash

11/19/2021 at 01:25PM

23
#69 - Michael Herring / @mayoroftuesday

11/29/2021 at 03:38PM

23
#70 - Curtis Ault / @Curtis_Ault

12/02/2021 at 05:36PM

23
#71 - Laughing Cavalier / @jovial_cavalier

11/07/2022 at 08:32PM

24
#72 - Kieron Browne / @KieronBrowne1

11/09/2021 at 09:47PM

24
#73 - Ofer Yehuda / @OferYehuda

02/19/2022 at 02:36PM

25
#74 - zendokite / @zendokite

10/18/2021 at 10:50AM

25
#75 - Андрей Осипенко / @os1penko_andrey

10/20/2021 at 05:35PM

25
#76 - preethamrn / @preethamrn

10/21/2021 at 07:21AM

25
#77 - perseo / @PerseoGI

10/25/2021 at 10:29PM

25
#78 - John Doe / @JohnDoe75830353

11/26/2021 at 04:31PM

25
#79 - rg thomas / @rgt47

02/08/2022 at 07:47PM

25
#80 - Robberechts Arne / @ArneRobberechts

05/22/2022 at 08:18AM

25
#81 - キムラ・OPEL・ユウジ / @kimurayuuji79

10/07/2022 at 04:16AM

26
#82 - あああ / @kVaY5ghuwn6J11E

11/02/2021 at 08:57AM

26
#83 - Omar Alawadhi / @OmarAla59544225

09/10/2022 at 09:13PM

26
#84 - vimgolfaccfekxh / @vimgolfaccfekxh

10/26/2022 at 09:00PM

27
#85 - yeonlee / @yeonlee13820351

11/08/2021 at 02:46PM

27
#86 - Snurli / @Snurlipus

11/20/2021 at 05:48PM

27
#87 - Christopher Williams / @chrstphrsnw

12/09/2021 at 11:47PM

27
#88 - A Random Vimgolfer / @AVimgolfer

02/04/2022 at 06:06AM

27
#89 - Il Granfiatore / @M_Klauer

03/09/2022 at 02:57PM

27
#90 - Will Long / @WillLon30283972

06/20/2022 at 03:27PM