Tuesday, April 28, 2009

Vim convert whole word to lowercase

UPDATE: following whatever is typed below the horizontal line will convert your entire file into uppercase. The better way for just a word is to use

gUw

Yep - no funny colons or commands - just get your cursor under the word and type gUw.




If you are a vim user and want to change some whole config to lower case, here is the quick shortcut:

:%s/[A-Z]/\l\0/g

That's a backslash-el, backslash-zero, by the way.

1 comment:

  1. you can just go to visual mode, select stuff and pres ~ (works both ways)

    ReplyDelete