I've written a script to convert 3 and 4 characters words, since they often are abreviations in the texts I work on.
Here is the starting text :
Diabetes - Hbp - Copd -
I want to transform it to :
Diabetes - HBP - COPD -
My script is composed of two lines:
%s/\v<(\w)(\w)(\w) /\u\1\u\2\u\3/g
%s/\v<(\w)(\w)(\w)(\w) /\u\1\u\2\u\3\u\4/g
Which is working, but I guess there is a more elegant solution. How to make vim match and upcase only n to m characters words?
:%s/\<\w\{3,4}\>
matches 3 or 4 characters words, but I can't find how to upcase my selection ...