Friday, June 9, 2017

vim tip

Changing case with regular expressions

For example, assume a line with the text "This is a test".
:s/\(test\)/\U\1 file/
produces: This is a TEST FILE
:s/\(test\)/\U\1\e file/
produces: This is a TEST file


http://vim.wikia.com/wiki/Changing_case_with_regular_expressions


No comments:

Post a Comment