Nvim Regex by @Rongzhou
Appearance
Generic
:%s#\n# #g
Markdown /md
Text <> list
:%s#^#- #
:%s#^- ##
Katex
\[ \( <> $$ $ delimiter change:
:%s/\(\\(\(.\{-}\)\\)\)\|\(\\\[\(\_.\{-}\)\\\]\)/\=submatch(1) != '' ? '$'.submatch(2).'$' : '$$'.submatch(4).'$$'/g
:%s/\$\$\(\_.\{-}\)\$\$\|\$\(.\{-}\)\$/\=submatch(0) =~ '^\$\$' ? '\['.submatch(1).'\]' : '\('.submatch(2).'\)'/g
Wikitext
<syntaxhighlight ... inline></syntaxhighlight> > <code></code>:
:%s#<syntaxhighlight[^>]*inline>\(.\{-}\)<\/syntaxhighlight>#<code>\1</code>#g
ordered list (#) > to unordered list (*):
:%s#\##*#g
[[File:{filename}]] > [[File:{filename}|400px|center]]
:%s/\[\[File:\([^]]*\)\]\]/[[File:\1\|400px\|center]]/g