I have a yaml file and I have to change some letters to uppercase.
F.e. here I want to change only the words after "value:"
As is:
field_map:
assess_1:
type: column
value: assess_1
assess_10:
type: column
value: assess_10
As to be:
field_map:
assess_1:
type: column
value: "ASSESS_1"
assess_10:
type: column
value: "ASSESS_10"
2
Answers
You can use ‘U’ before substitution.
You can match with
value: (S+)
and Substitute withvalue: U$1
Usage with your given text
Explanation
value: (S+)
– matchesvalue:
followed by a word and consider the word as group 1value: U$1
– replaces the match with leavingvalue:
as is and converting the matched group 1 to upper caseyou can do it with Multi Cursor:
value:
(also the space after the:
)"