the_yellow_logo
the_yellow_logo

Reputation: 687

How to have a regex with \| in a mapping

I have a tabularize command like this :Tabularize /^[^:]*\()\s\?\|@\)\@<!\zs:\ze.*[^:]/l1 which work for my need,

but I need to enter it as a mapping. However :noremap <Leader>a: :Tabularize /^[^:]*\()\s\?\|@\)\@<!\zs:\ze.*[^:]/l1<CR> fails.

I think it is because of \|. How can I fix it?

Upvotes: 1

Views: 107

Answers (1)

the_yellow_logo
the_yellow_logo

Reputation: 687

Romain, as always, had the answer. It was simply a matter of doubling the backquote, as in \\|.

Upvotes: 1

Related Questions