Freigeben über


Did you know... There's a keyboard shortcut default to upper and lower case a word in the editor? - #024

Make Uppercase and Make Lowercase menu items

  • Press Ctrl+Shift+U to make the current character or selected characters uppercase
  • Press Ctrl+U to make the current character or selected characters lowercase

I got to be honest here and say I had to ask around when these commands would be useful.  One scenario (thanks bill!) is where the caps_lock key is bound to be a control key.  For example, you type a word, then ctrl+shift+left arrow to select, then do Ctrl+Shift+U to upper case (instead of having to hold the shift key down to type the entire word).  Maybe intellisense has made me lazy.  =)

Technorati tags: VS2005Tip, VS2008Tip

Comments

  • Anonymous
    August 27, 2007
    PingBack from http://msdnrss.thecoderblogs.com/2007/08/28/

  • Anonymous
    August 28, 2007
    I can see this possibly being useful for the times when IntelliSense picks the wrong capitalisation. For example I often start by specifying a property, public string Something Then I type the getter, but before adding the backing field (which is named the same but with a lowercase start) - eg get {return something;} Since the field doesn't exist at that point, IntelliSense will try to capitalise it. The Ctrl-U shortcut would allow you to quickly correct the error. [Alternatively! - press escape to cancel IntelliSense, use anonymous properties (C# 3.0), use the 'prop' snippet, etc....]

  • Anonymous
    August 28, 2007
    I use the lowercase version a lot more than the uppercase version, but I do use both of them fairly regularly.  I don't have a good use case for you for this one, sorry.

  • Anonymous
    August 30, 2007
    Relief from those inconvenient CapsLock key moments: http://ihatethecapslockkey.com/

  • Anonymous
    September 25, 2007
    As a user, I would assume that the uppercase command would be Ctrl+U and the lowercase command would include the shift key, since it's the word 'uppercase' that starts with U.

  • Anonymous
    July 13, 2008
    現在の文字または選択した文字列を大文字にするには、 Ctrl + Shift + U キーを押します 現在の文字または選択した文字列を小文字にするには、 Ctrl + U キーを押します 正直なところ、私はこの

  • Anonymous
    August 17, 2008
    Нажмите Ctrl+Shift+U , чтобы заменить текущий строчный символ (или выделенный блок символов) на заглавный