I'm new to VimScript and trying to learn how to construct patterns.
Is there a Vim plugin like RegExr.com for testing patterns?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityI'm new to VimScript and trying to learn how to construct patterns.
Is there a Vim plugin like RegExr.com for testing patterns?
There is a very simple way, for which you do not need any plugin. Open a file with some content, turn on :set incsearch
and/or :set hlsearch
and try it out interactively with Vim.
That's how you learn best, using the tools that you have available.
The trace provide you a preview of the substitution and privide a good help to learn regular expression patterns.
If you are using Neovim you could also be interested by hypersonic
:set incsearch
and just trying it out interactively?