oleg-shilo / sublime-codemap

CodeMap - is a ST3 plugin for showing the code tree representing the code structure of the active view/document
MIT License
41 stars 4 forks source link

Automatic sync_code_map #10

Closed RenzoBertocchi closed 2 months ago

RenzoBertocchi commented 6 years ago

Is there not a way to keep code map view always sync with no need to manually "Reveal in CodeMap" each time? Thank you

Acecool commented 6 years ago

When you create a mapper / syntax file - it won't auto hide for that language... I had the same issue having to continuously re-open it until the mapper started returning results...

But, it may auto hide when you switch to a language it isn't set up for...

oleg-shilo commented 6 years ago

I remember that at the time of the original development ST3 did not allow (or I didn't find the way) to scroll without moving the focus to the CodeMap view. Thus I opted not to synch automatically as it would lead to constant focus jumping nightmare.

However I want to revisit this challenge again when I stat working on that gigantic PR. Thus, marking this a an enhancement request...

oleg-shilo commented 6 years ago

The latest release (v1.0.9+) auto syncs on every document save.

Acecool commented 6 years ago

I just noticed this - Nice... Although in some instances it seems to scroll all the way to the bottom ( and when scroll past eof is enabled, it's quite far )...

I'm going to open a new issue to see about removing scroll past eof in only code-map as I do like it in standard code...

Acecool commented 6 years ago

Is it possible to add auto-sync when switching between files?

Right now when switching between files the scroll position seems to be random and a lot of time it ends up all the way at the bottom... I haven't found a way to reproduce why it is happening...

I'm going to look at how you auto sync to see about integrating it into my mapper - ie between switching files, but it'd be better to have it in the back-end ie in CodeMap instead of the X system..