Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to convert a block of text to title case in Notepad++?

It should turn

asdf ASDF aSdF

into

Asdf Asdf Asdf

I see upper case and lower case on the edit menu, but those aren't quite what I'm looking for.

share|improve this question
up vote 30 down vote accepted

The TextFX plugin has this feature, they call it "Proper Case". You can find it under TextFX -> TextFX Characters -> Proper Case:

alt text

share|improve this answer
1  
Does this have a Hotkey? – Homer Mar 26 '14 at 18:33
3  
@Homer - you can assign one in Plugin Commands section of Shortcut Mapper. Item Proper case is present there, waiting for you :) – miroxlav Apr 20 '14 at 0:00

You can use replace text by regular expression:

enter image description here

Explanation:

Search text

  • \< matches the beginning of a word
  • (\w+) matches any sucession of word letters

Substituted by

  • \L translates everything to lowercase until the end of the replacement string
  • \u translates the next letter to uppercase
  • \1 places the first captured () search group

    1:

share|improve this answer

If you can't install the TextFX plug in you can create a macro that does something very close:

Place your cursor near a word, and click the red dot on the tool bar, or Macro>Start Recording.

  1. Use the ctrl+shift+ (left arrow key), to select the whole word

  2. Make it lowercase (ctrl+u).

  3. Press to go to the front of the word.

  4. Highlight the first letter (using shift+ once)

  5. Uppercase that, (ctrl+shift+u).

Press the black square, or go to Macro>Stop Recording. In the same section on the tool bar you should see a button with a floppy disk on it (alternatively there is an option in the macro menu). Press that and assign a hot key, I use ctrl+shift+alt+u.

share|improve this answer

One thing to keep in mind with this. The TextFX plug-in is only in the ANSI version. You will need to download the ZIP file and copy the contents of the ANSI directory to your computer. For some reason, the .exe only installs the unicode without a few key plug-ings.

share|improve this answer
    
no longer true. – Tuncay Göncüoğlu Jun 29 at 14:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .