double-click hyphen



  • hi, how to select a word with a hyphen?

    .b-page__block
    

    only the “page__block” is released when you double-click



  • Hello Andrew,

    depending on the language scintilla defines chars which are part of the word or not.
    To manipulate this you could use python script and function editor.setWordChars like

    chars = editor.getWordChars() + “@#_()[]”
    editor.setWordChars(chars)
    

    which would mean, that the existing chars would be extended by @#_()[]. In your case you would add the hyphen.
    If you put this in startup.py it will be automatically added each time you start npp.

    Cheers
    Claudia



  • Thank you, the script added startup.po but it OPERATE only the current tab, how to do so when you open a new tab to run this script?



  • Hello Andrew,

    I described here how it could be solved.
    Basically, you need to register a callback which gets called when you open a new tab or switch tabs and extend the wordchars accordingly.

    Cheers
    Claudia


Log in to reply