I've googled around but can't find anything about this.
There is a case: when I navigate deep down through large blocks of code in (for example) python, it would be useful to see which method, function, or loop I am currently in, when the start is not on screen (because it runs off the top of the screen).
So, consider such block of code:
def large_ugly_function():
... many lines of code ...
for i in list_of_items:
one_action(i)
i.method()
event_trigger()
... bla-bla-bla around 20-30 lines of code
... another for loop or function
... <current line>: screen goes down and I can't see the current line part of what loop
So I need to see something like header of current fold in "sticky" way: while I navigate through code deep down. It can be written in status line or somewhere else. For this example for in status-line it would be something like:
large_ugly_function->[for i in list_of_items:]->[another for loop or function]
Does anybody know how it can be achieved? Maybe some extensions? How it can be googled?
UPDATE Just wrote this question and found close to what I need but not fully: https://stackoverflow.com/questions/13634826/vim-show-function-name-in-status-line
I want something closer to folding: so function or loop or other logical block of code
UPDATE 2 Also close to this thing can be achieved with TagBar status line integration.
?for<Esc>
is a very quick and very cheap way to know where you are.tagbar#currenttag
function. And this is not what I need (but close as I wrote): it shows only the current function, and I'm talking about something like last fold level.:e foo.py
, go to the line you want to keep,:sp
to split your screen with the buffer at the same position in each split and then move only one split (make sure thatscrollbind
is off)