regular expression – Neovim commands or plugins for an equvialent of the :s command with different regex syntaxes
The most straightforward way to accomplish this is with :help filter and an external program. For example, if you like Sed or Perl syntax, you can do :%!sed s/…/…/ (or perl, awk, etc). (:! takes a range, which you can also construct using the ! Normal mode operator, like in !ip.)
You could create a custom S command that expands to :[range]!perl, if you like (see :help :command).
The :substitute command and other pattern-based commands use Vim’s pattern language, though, and it’s worth spending some time learning. Vim’s pattern language contains atoms specifically for searching text within Vim that many others would struggle to express (e.g., \%# matches the cursor position—most regular expression packages don’t have such a notion). See :help pattern.
Read more here: Source link
