Define word delimiter in Notepad++

2.4k views Asked by At

Can Notepad++ be configured to recognise only spaces as word delimiters?

Currently, in the string "hello!" she said., it places word boundaries like this: "|hello|!" |she |said|.. I want it to place them like this: "hello!" |she |said.

2

There are 2 answers

0
S.Serpooshan On

Go to Settings > Preferences… > Delimiter.

Select the option to Add your character as part of word and enter the chars you want to be treated as alphabet, in your case chars like: "!,.

Although, this is usually good to add some special chars as white list, but you may want to have a black list or vise versa. anyway, you can add many chars as you need.

0
Kapitano On

Scintilla (the system underlying N++) defines which characters to treat as word delimiters. N++ itself can't redefine them, but the NppExec plugin can temporarily set them for the current open tab.

So, install NppExec, go to Plugins>NppExec>Execute... and enter sci_sendmsg 2077 0 @" ".

Put whichever characters you want to be delimiters between the quotes.

Discussion here: https://sourceforge.net/p/notepad-plus/discussion/331754/thread/993b6ab9/