Converting text to Title case in Notepad++

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

alt text


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:


As the way has changed in the meantime here is how it works now (without TextFX):

Select the case you want to convert, press Alt-U or choose

Edit - Convert Case to - Title Case.

Convert Case to - Title Case

Converting to Title Case


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.