[Feature] double-click on PHP variable name to select '$' as well as character part

  • If I specify that the language in a file is PHP, I’d like np++ to select the entire variable name

    when I double-click on it, not just the ‘name’ part.

    PhpStorm, for example, does this & it seems the natural thing to do.

    Would really appreciate this.

  • Hello, @alanrew,

    Starting with the 7.3.1 version of N++, you can change the default word characters list ( any character matched by the regex \w )

    • Select the menu option Settings > Preferences… > Delimiter > Word character List

    • Click on the choice : Add your character as part of word

    • Type in the $ character, in the field

    • Close the Preferences dialog

    Et voilà !

    Remarks :

    • Strangely, the regex \w, still, does NOT match the $ symbol !?. Therefore, a PHP variable name should be matched with the regex \$\w+

    • A double-click on words , containing the $ symbol or ending with it will, also, select them !

    Best Regards


Log in to reply