hackmdio / hackmd-io-issues

Reporting issues about HackMD Enterprise Edition and HackMD.io
36 stars 8 forks source link

In Vim editor mode backreference can't work fine #65

Closed is3ka1 closed 2 years ago

is3ka1 commented 5 years ago

Is this a hackmd.io issue?

Read our Official tutorial

It's on https://hackmd.io/c/tutorials/

或是中文版 https://hackmd.io/c/tutorials-tw/

What's the problem

When I try to use backreference to replace things, I find it can't match the Regular Expression the Vim way.

maybe something like this:

:%s/\(\)/\1/

Current behaviour

Screenshot (optional) image Note Link

Expected behaviour

image image

After Press y / Y: image

Environment

I use HackMD on:

Desktop

Additional context

(ゞω< )

ebardie commented 2 years ago

The regex dialect isn't the same as the one used by Vim :(

The following works to change all words ending in 'ing' to end in 'ed'.

:%s/([a-zA-Z]+)ing/$1ed/g