-2

is there any plugin or other stuff to know in which function I am currently in?

For example: let's say I have a function called my_long_function($arg1, $arg2) 400 lines of code long; I'm in the middle of it (so I can't actually see the name): is it possible to display the name?

Carlo
  • 4,016
  • 7
  • 44
  • 65
  • Possible duplicate of [Retrieving the name of the current function in php](http://stackoverflow.com/questions/2115913/retrieving-the-name-of-the-current-function-in-php) –  Sep 20 '12 at 14:46
  • 8
    if your functions are 400 lines long - you're looking to solve the wrong problem – AD7six Sep 20 '12 at 14:46
  • 2
    @JackManey Not a duplicate; the asker is looking for a vim plugin, while that duplicate does not mention vim – Chris Forrence Sep 20 '12 at 14:47
  • 1
    In normal mode type: `?function\s` - then ctrl-o to return to your originating position. – vstm Sep 20 '12 at 14:49
  • @AD7six ok, but that's not the point. I'm working on code written by other people. 400 lines was just to say... – Carlo Sep 20 '12 at 15:03

1 Answers1

4

Look at this plugin:

http://www.vim.org/scripts/script.php?script_id=3197

If your functions are 400 lines long, this appears like it can help. You may want to refactor some code though, so as to not have such long functions.

Chris Forrence
  • 10,042
  • 11
  • 48
  • 64