I would like to either find or write a plugin that does the following:
Assume I have this python code:
def foo(a,b,c):
# comment
[100 lines that do stuff]
for i in range(N):
[100 lines that do stuff]
# another comment
--> more code
Let's assume this does not vertically fit in to my window because the height is only 100 lines and I can't see the entire function as a whole. Not even the beginning of the for-loop when my cursor is where the arrow -->
is.
I would like to have plugin, where the buffer would look as follows:
def foo(a,b,c):
for i in range(N):
-----------------------------------------------------
[96 other lines that I can see]
# another comment
--> more code
In other words, I would like to see the lines that are not visible for me which are the first lines to be one indentation level higher. This way when my cursor is at -->
, I would not need to scroll up to figure out which function or for-loop I am in.
Does such a plugin exist? If not, how would one add these lines at the top of the editor without modifying the buffer?