Here is how you can select the whole $php_variable / $word in Npp, including the '$' sign, with Alt + Click:
EDIT: I realize now that you can do skip the Npp macro and do it only with AutoHotKey. But I'll leave the macro anyway in case smb likes it. For more details look into the AutoHotkey.chm, in the contents tab, navigate to: Kheyboard Control >> Send/SendRaw...
Do not put spaces between the {LButton}{...} or they will be inserted into the editor (the space after the comma seems ok).
It would probably go something like this (havent tested it).
!LButton::
Send, {LButton}{CTRLDOWN}{LEFT}{CTRLUP}{LEFT}{CTRLDOWN}{SHIFTDOWN}{RIGHT}{RIGHT}{SHIFTUP}{CTRLUP}
return
END EDIT
I have finally done this with the help of
- Autohotkey (google it).
- npp macro
The macro:
- before you start to record the macro: click inside a php variable so that the blinking cursor is inside it(eg:
$php_varia|ble
)
- now hit record macro
- now press: Ctrl+left, left(no ctrl), ctrl+shift+right, ctrl+shift+right; This will select the whole php variable / word, including the '$'
- stop the macro record, then: 'Save Current Recorded Macro'. Assign to it a keyboard shortcut (I assigned Ctrl + Alt + Shift + B)
The Autohotkey script:
; alt + click translated to Click followed by Ctrl Shift Alt B
!LButton::
Send, {LButton}{CTRLDOWN}{SHIFTDOWN}{ALTDOWN}b{ALTUP}{SHIFTUP}{CTRLUP}
return
Now when you Alt + Click on a php variable in NPP it will select all of it, including the '$' sign.
I also have script for Copy / Cut / Paste by Ctrl + LMouseBtn / Ctrl + Shift + LMouseButton / Ctrl + RMouseButton:
^RButton::
Send, {CTRLDOWN}v{CTRLUP}
return
^LButton::
Send, {CTRLDOWN}c{CTRLUP}
return
^+LButton::
Send, {CTRLDOWN}x{CTRLUP}
return
; the plus sign means the Shift key, etc
; see 'Keyboard control' >> 'Hotkeys and Hotstrings' in the Autohotkey help.chm
$
sign? – Latin