wincent / scalpel

🔪 Fast within-file word replacement for Vim
MIT License
118 stars 4 forks source link

Substitution failing #7

Closed narcisse81 closed 6 years ago

narcisse81 commented 6 years ago

Hello

This morning, I wanted to do a given substitution on a VHDL code:

procedure spi_write(signal spi_in     : out spi_in_type;
                    signal spi_out    : in  spi_out_type;
                    signal dio_dig    : in  slv4;
                    constant spi_data : slv32_array);

The substitution was: :S/\v\<slv4>/slv12/

It failed, giving me the following error message: Invalid patterns: /\v\<slv4>/slv12/ Expected patterns of the form "/foo/bar/".

Other kinds of substitutions work as expected. My vim version is 7.4.629, on a CentOs7 linux distro (I use gvim actually)

Best regards Narcisse

wincent commented 6 years ago

Ah, excellent catch. That is a very narrow edge case that you've found there. I'll push a commit that fixes this.