Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the normal mode vim command that converts false to FALSE as well as 12:48:03 AM to 12:48 simultaneously?

Tags:

vim

vi

I accidentally performed a command in Normal mode in vim, on a TSV file, where it converted all the false to FALSE, all the true to TRUE, and all the times from 12:48:03 AM format to 12:48.

I believe it was a single command, because I could undo and redo it using 'u' and 'Ctrl-R', but I can't figure out what it was. Does anyone know?

If there is a Command Mode equivalent, I'd also be interested in learning about it, but I am trying to find the normal Mode version.

I have already tried q: and know that it is not a Command Mode command that I accidentally hit.

like image 900
merlin2011 Avatar asked Dec 05 '25 05:12

merlin2011


1 Answers

For changing the case of words you use "gu" and "gU" in normal mode. Both need a scope, so he are some examples:

guu - make whole line lowercase
gUU - make whole line UPPERCASE
guw - make word lowercase
gUw - make word UPPERCASE
guj - make this and next line lowercase
gUk - make this line and previous line UPPERCASE

It also works with curent selections and is fully "." repeatable. More can be found under change in the vim docs.

like image 76
vim_commando Avatar answered Dec 08 '25 10:12

vim_commando



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!