I wrote a function for selecting a text region and replacing in it certain predefined characters:
fun! Tstrepl() range s/\%Va/\="\u2227"/ge " 'a' to '∧' s/\%Vb/\="\u2228"/ge " 'b' to '∨' endfun vnoremap QQ :call Tstrepl()<CR>
The problem is that the function doesn't behave as expected and I cannot figure out why.
The following text is handled OK:
BEFORE: bbbaaa AFTER: ∨∨∨∧∧∧
But another text isn't handled OK:
BEFORE: aaabbb AFTER: ∧∧∧bbb
What's wrong with the function?