In PHP (and a few other languages), variables always begin with a $ sign. It would be nice if the editor knew that this sign is part of the word, so that when you doubleclick the variable or hold down Ctrl and use the arrows to move through text, one word at a time, the $ is considered part of the name.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yeah, I'm also looking for that feature. That would be very helpful.
The problem with siranm's suggestion is: If you click between the dollar sign $ and the variable name, then sometimes notepad++ selects more than just this variable, but also brackets and text before the variable.
For example, if you have this:
function foo($text, $id) { }
then it works fine with $id but not with $text.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That is the first thing I noted, as a PHP developer.
Notepad++ is a great product, and I like a lot the automatic indenting it offers, that was what made me use it (although the automatic indenting is really thought for C code, it works fine [not perfect] with PHP).
I am thinking of writing a plugin that select the "$" when I double-click, but it may be kind of difficult, as I know very little C++... so if someone has it, or is willing to do it : ) it would be reaaaally nice.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wanted to share that if you double-click right in between the dollar sign and the variable name, then whole thing is selected (the "$" with the variable name).
greetings...
An M
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In PHP (and a few other languages), variables always begin with a $ sign. It would be nice if the editor knew that this sign is part of the word, so that when you doubleclick the variable or hold down Ctrl and use the arrows to move through text, one word at a time, the $ is considered part of the name.
Yeah, I'm also looking for that feature. That would be very helpful.
The problem with siranm's suggestion is: If you click between the dollar sign $ and the variable name, then sometimes notepad++ selects more than just this variable, but also brackets and text before the variable.
For example, if you have this:
function foo($text, $id) { }
then it works fine with $id but not with $text.
I'd like to know that too. Is there any setting in Notepad++ that would make it select PHP variables together with the dollar sign?
I must admit I had never thought of this and I use it day to day. Good suggestion! :)
Yes! Please!
That is the first thing I noted, as a PHP developer.
Notepad++ is a great product, and I like a lot the automatic indenting it offers, that was what made me use it (although the automatic indenting is really thought for C code, it works fine [not perfect] with PHP).
I am thinking of writing a plugin that select the "$" when I double-click, but it may be kind of difficult, as I know very little C++... so if someone has it, or is willing to do it : ) it would be reaaaally nice.
Hi,
I wanted to share that if you double-click right in between the dollar sign and the variable name, then whole thing is selected (the "$" with the variable name).
greetings...
An M
Yes, this was a requirement for me too. Easy fix is to create a macro:
Make sure you have something on your clipboard.
Open a blank document.
Start the macro
Type $ and then ctrl-c to paste whats on the clipboard. Doesn`t matter what it is.
Save the macro with a shortcut.
Now when you highlight a var, and copy, use the new shortcut. It will paste a dollar symbol and whatever is on the clipboard. Viola!!