Vim matches regexp value

In gvim (v8) regexp we can specify a point in the selected area with \%V, e.g. s/\%Vabc/xyz/. However, \%Vmatching anywhere in the selection, I want something to match only at the beginning or end of the visual selection (label <,>).

Moreover, this regular expression /\%V\_.*\%V/does not select the final character of the region. \%Vshould be zero width?

So, how can I indicate the position of the label, as in:

:s/\mark( <..) \ ZS (ABC) \ ge \ sign (>) / hug / `

+4
source share
1 answer

, \%V ; , ., : /\%V\_.*\%V./

; '<,'>: /\%'<.*\%'>./. , , .

+2

Source: https://habr.com/ru/post/1682322/


All Articles