When editing python files, I frequently loose track of where I am in the structure of the file. For instance, if I have several large classes that all implement a
I think both Tagbar and Taglist have that kind of feature but you can always do
[[ to jump to the class definition and
`` (backtick backtick) to jump back to your current location.
This quick and dirty mapping will echo the first class and method definitions above your current cursor location:
nnoremap <F6> :echo getline(search('^class', 'bn')) . "\n" . getline(search('^\s*def', 'bn'))<CR>