Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Fighting with parent class jumping

  • Loading branch information...
commit 54da9eb6707bf1f3922dbb2d9cadcdad28358cf0 1 parent 2082068
@zergu authored
Showing with 2 additions and 9 deletions.
  1. +2 −9 project-jumper.vim
View
11 project-jumper.vim
@@ -117,16 +117,9 @@ function! JumperJump(target)
" Parent class - edit
elseif a:target == "parent"
throw "Not implemented yet"
- let l:linenum = 0
- while 1
- let l:matches = matchlist(getline(l:linenum), 'class.*extends \(.*\)')
- if (len (l:matches))
- let l:parent_name = l:matches[1]
- break
- endif
- let l:linenum += 1
- endwhile
+ let l:parent_name = system("grep -o 'extends \\w\\+' ".expand("%:p")." | sed 's/extends //' | sed 's/\\^\\@//")
+ throw "find ".l:maindir." -type f -name \"".l:parent_name.".php\""
if l:parent_name
let l:results = split(system("find ".l:maindir." -type f -name \"".l:parent_name.".php\""))
execute "edit ".l:results[s:MultipleChoice(l:results)]
Please sign in to comment.
Something went wrong with that request. Please try again.