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.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityIs 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.
The TextFX plugin has this feature, they call it "Proper Case". You can find it under TextFX -> TextFX Characters -> Proper Case:
Plugin Commands
section of Shortcut Mapper. Item Proper case
is present there, waiting for you :)
– miroxlav
Apr 20 '14 at 0:00
Edit | Convert case to
– Marjan Venema
Jul 9 '17 at 11:21
You can use replace text by regular expression:
Explanation:
Search text
\<
matches the beginning of a word(\w+)
matches any sucession of word lettersSubstituted 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.
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.
Use the ctrl+shift+← (left arrow key), to select the whole word
Make it lowercase (ctrl+u).
Press ← to go to the front of the word.
Highlight the first letter (using shift+→ once)
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.
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.