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

208 active golfers, 986 entries

Leaderboard (lowest score wins):
20
#1 - John Braxler / @braxler

10/15/2021 at 06:28PM

20
#2 - Jon Krause / @jkrause314

10/16/2021 at 06:48AM

20
#3 - Smylers / @Smylers2

10/16/2021 at 07:20AM

20
#4 - A A A / @37fatos

10/19/2021 at 09:27PM

20
#5 - Petro Тrouq / @zulolosi

10/20/2021 at 03:24AM

20
#6 - zhang_walter / @zhangwalter1

10/27/2021 at 05:11PM

20
#7 - Qarthik / @qrthik

10/31/2021 at 04:30PM

20
#8 - Duncan / @Duncan31503119

11/01/2021 at 08:47PM

20
#9 - Calarasanu Andrei / @_fanfani4_

11/03/2021 at 02:34PM

20
#10 - Michael / @triorph

11/09/2021 at 08:42AM

20
#11 - 김철호 / @Mx2W2

11/12/2021 at 10:30AM

20
#12 - Patrick Rainey / @PatrickJRainey

11/20/2021 at 06:47PM

20
#13 - Jianfeng / @Jianfen22425058

12/20/2021 at 02:57AM

20
#14 - Selvaganapathy P / @canabady

12/28/2021 at 10:13AM

20
#15 - roudens / @roudens2

01/08/2022 at 03:36PM

20
#16 - Sammit / @somemeatjain

01/24/2022 at 12:53PM

20
#17 - blub blub / @xyDZdMNGzWLT

01/31/2022 at 07:53PM

20
#18 - Laurent Isenegger / @lisenegger

03/03/2022 at 05:05PM

20
#19 - Shady / @MikolajPiekutow

03/13/2022 at 07:41PM

20
#20 - John Xu / @xzzhiao

04/06/2022 at 01:58AM

20
#21 - sapir malka / @sapir5522

04/13/2022 at 02:02PM

20
#22 - Marc Jethro Avila / @maje_avila

05/10/2022 at 12:34PM

20
#23 - funky_koval / @iam_funky_koval

05/15/2022 at 07:32PM

20
#24 - russellzhaomao / @russellzhaomao

05/19/2022 at 12:54PM

20
#25 - jcbglbmn / @JacobGelbman

05/23/2022 at 06:02AM

20
#26 - Brandon / @Brandon10678836

08/28/2022 at 11:10PM

20
#27 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 06:30AM

20
#28 - Alex Lewin / @_AlexLewin

09/20/2022 at 09:51PM

20
#29 - sap / @sap38838304

09/28/2022 at 01:44AM

20
#30 - Janzen / @__Coos

10/07/2022 at 07:23AM