Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ method the press `<Leader>rem`

You will be prompted for the name of the new method.

If you want to bypass the menu:

vnoremap <leader>em :call PhpRefactorExtractMethodDirectly()<cr>

### RENAME LOCAL VARIABLE
In normal mode move the cursor so it's inside the name of the variable
which you want to rename. Press `<Leader>rlv`
Expand Down
4 changes: 4 additions & 0 deletions plugin/phprefactor.vim
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ func! PhpRefactorExtractMethod(startline, endline)
" todo : exit visual mode
endfunc

func! PhpRefactorExtractMethodDirectly() range
call PhpRefactorExtractMethod(a:firstline, a:lastline)
endfunc

func! PhpRefactorLocalVariableToInstanceVariable()
" check the file has been saved
if &modified
Expand Down