1

I'm struggling to explain what I want, and I do not even know if something like this is possible in vim.

I code in PHP / JavaScript.

In a large file, I would like a statusbar to show me:

  • which function the cursor is currently in (this is the main one I want).
  • if possible: what control structures I'm currently in (if/switch/etc).

e.g:

file.php > my_function() > if > if > switch > while

Is this possible, and if so, how?

psx
  • 115
  • 3

1 Answers1

2

I would suggest you to consider installing the context plugin.

It make sure the context lines (function, switch, if) keep visible as long as they are relevant to analyze the code you browse (the current line of the cursor).

Vivian De Smedt
  • 16,336
  • 3
  • 18
  • 37