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

203 active golfers, 980 entries

Leaderboard (lowest score wins):
21
#61 - brett / @brettyukich

08/24/2022 at 12:33PM

21
#62 - Andrii Soldatenko / @a_soldatenko

10/15/2022 at 01:12PM

21
#63 - steve / @steve35773420

11/12/2022 at 06:52PM

21
#64 - Ivan Trepakov / @liontiger23

12/30/2022 at 04:56PM

21
#65 - naka / @nak38223985244

06/22/2023 at 01:07PM

21
#66 - ilyas / @Ahaaah2071

09/18/2023 at 09:06PM

21
#67 - Sergej Karavajnij / @basyanya_sk

11/03/2023 at 07:38AM

21
#68 - Leon Katsnelson / @leonkatsnelson

12/15/2023 at 10:17PM

21
#69 - dehi / @dehidehidehi

02/11/2024 at 05:35PM

21
#70 - かみひろ / @km_hr

03/18/2024 at 07:49AM

22
#71 - Jean George / @JeanGeo20504212

10/16/2021 at 12:01PM

22
#72 - vimgolfleo / @vimgolfleo1

10/16/2021 at 06:37PM

22
#73 - jrvieira / @zjrvieira

10/20/2021 at 09:56PM

22
#74 - betstamp / @betstamp

10/22/2021 at 03:04AM

22
#75 - Johan Arrhen / @JoPeArrhen

10/22/2021 at 07:39PM

22
#76 - Ramon Comellas / @rcomellas

10/23/2021 at 03:14PM

22
#77 - TimMcGuire / @mcguire

10/25/2021 at 09:22PM

22
#78 - Romain Heller / @Rom1deTroyes

10/31/2021 at 09:00PM

22
#79 - 6cdh / @cd6cdh

11/01/2021 at 11:45AM

22
#80 - Darius Smaliukas / @daraz999

11/03/2021 at 10:59AM

22
#81 - Marcin Krajewski / @mkrajewski_

11/23/2021 at 01:12PM

22
#82 - Kiran / @kiranprasadk

11/28/2021 at 02:23PM

22
#83 - $HA-|| / @s_k0731

11/29/2021 at 06:14PM

22
#84 - AMG / @anmigneer

12/14/2021 at 12:22PM

22
#85 - deusthe / @deusthe91

12/20/2021 at 02:27PM

22
#86 - Sergey Ryabko / @sergey_ryabko

01/17/2022 at 03:49PM

22
#87 - POSIX / @po6ix

02/01/2022 at 04:23AM

22
#88 - pusha t daily / @rudellius

04/08/2022 at 09:58PM

22
#89 - Gen / @gen_f_74

05/18/2022 at 12:30AM

22
#90 - armaninux / @armaninux

04/05/2024 at 07:32PM