symbols-tree-view icon indicating copy to clipboard operation
symbols-tree-view copied to clipboard

[FEATURE REQUEST] Embed into the left sidebar

Open grandsong opened this issue 9 years ago • 4 comments

I love this package and looking forward to its growth.

Here's my request.

What happens

I have a 2K (2560*1440) monitor screen. So, I can enjoy two panes of buffers (left and right).

However, the sidebar of symbols-tree-view is at the right end of Atom window.

You can easily imagine how inconvenient it is when I edit in the left pane while the sidebar is half a screen away.

My solution

My first thought was to quest for creating a sidebar for each pane. But I guess it will be too difficult and/or prone to bugs.

Then I came to a compromised yet quite nice solution.

Although I always keep two panes open, in most time I only use the left one.

And my screen is not only wide but also high (tall). I have a lot of space in the left sidebar, which contains the file nav component (File Tree View) for which half of the height is already quite enough.

Some editors other than Atom have their file nav and symbol nav both in their left sidebar. I guess it is a good, if not best, practice.

I know there are reasons for you to have made your symbol nav in a right sidebar. Leave it as default.

I just hope for a new option in the settings which if I enable, the symbol nav will be in the left sidebar instead, beneath the file nav.

Potential value

I don't know how many people are like me. This might be not of high priority. But it is quite important to me at least.

Some users whose screens are smaller than mine may also find this feature helpful. In many applications, nav components are all at left and people are used to it.

Thank you, xndcn, in advance.


因为"cn",我搜索了一下,发现你果然是中国人;而且挺有名哪。

但在这里交流时,我们应该用英文,是吗?

grandsong avatar May 30 '15 09:05 grandsong

@grandsong Thank you, if you like it, you can try to modify https://github.com/xndcn/symbols-tree-view/blob/master/lib/symbols-tree-view.coffee#L127 to use addLeftPanel directly.


谢谢,不敢当啊...最近一段时间实在太忙了,完全抽不出空来... 非常感谢你在此回答和解决问题...无以为报啊... 再次表示感谢!

xndcn avatar Jun 08 '15 02:06 xndcn

同一个

    attach: ->
      @panel = atom.workspace.addLeftPanel(item: this)

我这样写了之后,面板的确出现在左边了。但它并没有和文件夹树共用同一个侧边栏,而是为自己新增了一个侧边栏。

After my modification as above, the panel appears on the left. However, it creates a new sidebar for itself instead of sharing the sidebar where the file tree view is.

2015-06-23_193024

这样的体验还是不够好。

The user experience is not good enough.

看来还是需要你费心研究一下咯。不用着急,慢慢来吧。毕竟这不是正式工作,而仅仅是业余奉献。

It seems that more effort is required which may bother you. Take your time. After all, this is not a day job but just willingful contribution in spare time.

grandsong avatar Jun 23 '15 11:06 grandsong

我发现了一个Atom包 "tree-view-open-files",很适合作为技术参考。

grandsong avatar Jun 29 '15 09:06 grandsong

I think that the logic for displaying the tree should be the same as is used for the minimap. If you split the window into 2 panels, you want 2 of these trees. Each should respond to state changes in their own panel exclusively so that when you switch panels, the state of that panel (the same as cursor position is remembered).

dpwrussell avatar Feb 18 '16 21:02 dpwrussell