Jump to content

Nvim Regex by @Rongzhou

From Wikibase
Revision as of 20:38, 29 September 2026 by Rongzhou (talk | contribs) (wikitext)

Markdown /md

Text <> list

:%s#^#- #
:%s#^- ##

Katex

\[ \( <> $$ $ separator change:

:%s/\(\\(\(.\{-}\)\\)\)\|\(\\\[\(\_.\{-}\)\\\]\)/\=submatch(1) != '' ? '$'.submatch(2).'$' : '$$'.submatch(4).'$$'/g
:%s/\$\$\(\_.\{-}\)\$\$\|\$\(.\{-}\)\$/\=submatch(0) =~ '^\$\$' ? '\['.submatch(1).'\]' : '\('.submatch(2).'\)'/g

Wikitext

> :

:%s#<syntaxhighlight[^>]*inline>\(.\{-}\)

#\1#g

</syntaxhighlight>