arnaud-lb / vim-php-namespace

PHP namespace support for VIM. Types "use" statements for you
256 stars 29 forks source link

Expanding a class name with underscores in it duplicates part of the name. #12

Closed aaronbieber closed 10 years ago

aaronbieber commented 10 years ago

Given a class name containing underscores, like this:

$foo = new Base_Controller

With the cursor at the end, trigger expansion with :call PhpExpandClass() and observe that the resulting line looks like this:

$foo = new Base_AB\Module\Controllers\Base_Controller

The actual namespace is \AB\Module\Controllers\Base_Controller. It should be prefixed with a backslash (since it is at the root of the namespace) and obviously shouldn't duplicate the portion of the class name up to the underscore.

arnaud-lb commented 10 years ago

Fixed, thanks!