diff --git a/plugin/php-refactoring-toolbox.vim b/plugin/php-refactoring-toolbox.vim index 04673fa..b18e7d3 100644 --- a/plugin/php-refactoring-toolbox.vim +++ b/plugin/php-refactoring-toolbox.vim @@ -46,8 +46,8 @@ endif if g:vim_php_refactoring_use_default_mapping == 1 nnoremap rlv :call PhpRenameLocalVariable() nnoremap rcv :call PhpRenameClassVariable() - nnoremap rm :call PhpRenameMethod() nnoremap eu :call PhpExtractUse() + nnoremap rm :call PhpRenameMethod() vnoremap ec :call PhpExtractConst() nnoremap ep :call PhpExtractClassProperty() vnoremap em :call PhpExtractMethod() @@ -147,7 +147,7 @@ endfunction " }}} function! PhpRenameClassVariable() " {{{ - let l:oldName = expand('') + let l:oldName = substitute(expand(''), '^\$*', '', '') let l:newName = inputdialog('Rename ' . l:oldName . ' to: ') if s:PhpSearchInCurrentClass('\%(\%(\%(public\|protected\|private\|static\)\_s\+\)\+\$\|$this->\)\@<=' . l:newName . '\>', 'n') > 0 if g:vim_php_refactoring_auto_validate_rename == 0 @@ -162,7 +162,7 @@ endfunction " }}} function! PhpRenameMethod() " {{{ - let l:oldName = expand('') + let l:oldName = substitute(expand(''), '^\$*', '', '') let l:newName = inputdialog('Rename ' . l:oldName . ' to: ') if s:PhpSearchInCurrentClass('\%(\%(' . s:php_regex_func_line . '\)\|$this->\)\@<=' . l:newName . '\>', 'n') > 0 if g:vim_php_refactoring_auto_validate_rename == 0 @@ -211,7 +211,7 @@ endfunction function! PhpExtractClassProperty() " {{{ normal mr - let l:name = expand('') + let l:name = substitute(expand(''), '^\$*', '', '') call s:PhpReplaceInCurrentFunction('$' . l:name . '\>', '$this->' . l:name) if g:vim_php_refactoring_auto_validate_visibility == 0 let l:visibility = inputdialog("Visibility (default is " . g:vim_php_refactoring_default_property_visibility . "): ")