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

On 2 columns setup map opens 'in the back' #2

Closed kaste closed 6 years ago

kaste commented 7 years ago

I have a 2 columns setup, being on the right (second) column the following happens:

fkx1bat3bq

I would rather expect that a 3rd column opens. At least the map should be visible.

oleg-shilo commented 7 years ago

Thank you. Will work on it.

Unfortunately there is a limit on how much can be done for custom vertical panels in ST. I would rather use some sort of a true sidebar instead of mimicking it with a text view. Anyway, I had to impose a rather unpleasant constraint - CodeMap is always placed in the column '2' and it reflects the code in the column '1'. I just don't see any other way.

Though your point stands. `Toggle Visibility' should bring the view on top of other views.

kaste commented 7 years ago

It basically works with 3 columns. And you can get this to work with some sublime Fu and more coding of course ... 😼 nfjutby6ry .

oleg-shilo commented 7 years ago

I have submitted the fix so you can get it from github. But I haven't created the tag just yet so probably you need to bring it manually if you don't want to wait.

The fix ensures that after showing the CodeMap view it stays on top.

As for 3-column layout, yes I expect it to work as it is. The reason for 2-nd column constraint is that I see no ideal user experience so I have to place codemap view somewhere outside of the first group (e.g. column 2).

May be I will come up with something better after some user feedback :)

oleg-shilo commented 7 years ago

The latest release (v1.0.2) has the following change to address the User Experience limitations:

The CodeMap view is always placed in the most right column (group) of the active window. If the layout has only a single column then the plugin automatically switches in the "2-columns" layout. You can also configure plugin (via setting 'close_empty_group_on_closing_map') to hide the group on closing the CodeMap view when it is the only view in the group.

The release/update is tagged so it can be retrieved via Repository channel in ST3.

kaste commented 7 years ago

Will try it on next sublime restart