Skip to content

Adding $ to 'iskeyword' breaks PHP #20

@tommcdo

Description

@tommcdo

Since PHP files can include JavaScript blocks, it seems that this plugin gets invoked for PHP files as well. This plugin runs setlocal iskeyword+=$, which is a good thing for JavaScript; however, in PHP, including $ in 'iskeyword' breaks the expected behaviour of the word text object, as well as things like * and #. In PHP, class members are declared like public $foo, but accessed like $this->foo, so technically $ is not part of the variable name, but more of a variable indicator.

I know this plugin is for JavaScript, but it's nice not to have unexpected side effects. I can't think of a perfect solution to this, unfortunately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions