I am trying to modify or tweak how notepad++ selects a phrase, word, number or an expression when using mouse. This is not specific to any language rather in normal text file.
For example in case of an IP address 10.1.1.1; if I double click on it using mouse it only selects 10 or 1. I would like to change that so that by double clicking I can select whole IP Address in one go.
After quite a bit of search I found following post. As I am complete novice I don’t know who to make this work.
I’ll appreciate if some one can help me with this.
Don's answer doesn't seem to solve your problem, and Notepad++ doesn't handle it at this point.
What you'd need is to ad some chaacter (the dot) to the list of the characters Scintilla considers as part of a word. This is possible using a script run through NppExec - unless you prefer using some other scripting language.
Or you may wish to ask for customised word character sets in user defined languages, that could be another route. But you'll have to request it on IdeaTorrent, and to hope it gets implemented.
Thank you very much for your reply and clarification.
You can enable this in Python Script - if you add it the following to the startup script, it will work for both views. Change the drop down from the "Configuration" menu option to "ATSTARTUP" to get it to run when Notepad++ starts.
Obviously you can tweak the characters with this.
This works perfectly and will save me lot of time daily.
Thank you so much…
Is it possible to tweak this script so it will be enabled on all Tabs. What I noticed is that script is active only on initial Tab. I have to run the script for every other tab that I open.
That's odd - I wouldn't imagine N++ sets the word chars for each file, but anyway, the answer is yes… :)
I've not got time at the moment to test this actually works, but it should do.
N++ does not update the word character set, which is a problem sometimes. I haveplans for tewaking this on a per language basis - it already works for UDLs in my modified version.
The script you post worked randomly.
If you open some files, and switch between them, some times, the word chars is using the notepad++'s default.
i am using notepad++ 5.9.3 & Python Script 0.9.2.0
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.