Pulsar-Edit-Highlights / selected

@Pulsar-Edit package for highlighting occurrences of your selection.
https://web.pulsar-edit.dev/packages/highlight-selected
MIT License
248 stars 67 forks source link

PHP variable selection #222

Open Leo252525 opened 4 years ago

Leo252525 commented 4 years ago

Hey there, I'm having troubles with the variable selection in PHP. I want the plugin to ignore the $ in PHP. So it should only select the "variable" in "$variable".

I excluded the $ in the settings but it still doesn't work for me.

"highlight-selected": allowedCharactersToSelect: "@%-"

Do you have any tips?

Thanks a lot!

jordan-webdev commented 3 years ago

I have the opposite problem. For me I want to include the $, but it's not being selected. The $ is included in the settings.

Also, it is not highlighting other instances in the same file like it used to do.

Note, I am talking about highlighting by double clicking. It works if I highlight by dragging.

andriy063 commented 3 years ago

I have the opposite problem. For me I want to include the $, but it's not being selected. The $ is included in the settings.

Also, it is not highlighting other instances in the same file like it used to do.

Note, I am talking about highlighting by double clicking. It works if I highlight by dragging.

Same thing Any solutions?

michaelvickersuk commented 3 years ago

For me I want to include the $, but it's not being selected. The $ is included in the settings.

Same, but only since updating Atom to 1.54.0, prior to that I'd not experienced this issue. Status bar count is still working correctly.

Seems there's two workarounds for this by modifying the non word characters:

hellodaniel commented 3 years ago

Seems there's two workarounds for this by modifying the non word characters

This still doesn't seem to add the same function as before (i.e.: double click to select+highlight word). Would love to get a solution it's driving me up the wall

michaelvickersuk commented 3 years ago

This still doesn't seem to add the same function as before (i.e.: double click to select+highlight word).

Strange, the workaround fixed the problem for me and the double click now works exactly like it did before.

  editor:
    nonWordCharacters: "/\\()\"':,;<>~!@#%^&*|+=[]{}`?-…"
hellodaniel commented 3 years ago

I don't know what I did wrong but thanks - yes that worked 🙄 idiot me

Leo252525 commented 3 years ago

For me I want to include the $, but it's not being selected. The $ is included in the settings.

Same, but only since updating Atom to 1.54.0, prior to that I'd not experienced this issue. Status bar count is still working correctly.

Seems there's two workarounds for this by modifying the non word characters:

  • Remove $ from Settings > Editor > Non Word Characters Or
  • Add $ to Settings > Packages > Language PHP > Non Word Characters

That worked for me as well. Thanks a lot!