Alternatives to Tree-View?


#1

Wise folk of the forum:

I want to use Atom. In the time I’ve spent playing around and experimenting, I’ve really enjoyed it.

However, I need something like Tree-View to go along with it. And as it stands, the “drag and drop” behaviors (or bugs, depending on your point of view), are a deal-breaker. It’s simply too dangerous to use. I’m referring to these issues:

https://github.com/atom/tree-view/issues/588
https://github.com/atom/tree-view/issues/835
(Also GitHub issues #566, Pull #623, Issue #996, Issue #1272, Issue #875, and probably many more)

Given the age of these issues, and repeated dismissals by the project owners, I’ve given up hope for a resolution. And I don’t personally have the time/skill to fork, fix the Drag and Drop bug (or disable it entirely). And then maintain my own alternate version of Tree-View indefinitely.

Instead, I’ve just been using other text editors. :slightly_frowning_face:

So, o’ wise peoples of the forum…what is the next best thing/option to Tree View?

Many thanks in advance for feedback/suggestions/limericks.


#2

You can disable the drag-and-drop functionality without ever touching the package code, since everything is in JavaScript in Atom. To see how this works, open the developer tools (ctrl-shift-i), click on Console, and run the following code by pasting it into the line at the bottom of the console screen:

tv = atom.packages.getActivePackage('tree-view')

You see the results? That’s the entirety of the package in Atom, all the metadata and functionality. You can read it if you want, or you can just run this code to override this function:

tv.mainModule.treeView.onDragStart = (e) => console.log("Haha! Drag disabled.")

Now try dragging something. You can’t. When you look in the console, you’ll see the taunt. If you want to make it semi-permanent, you can add it to init.coffee with the instruction to return nothing at all. If it’s in init.coffee, this modification will be disabled in safe mode (but then so would anything you did to tree-view, or any alternative you found).

tv.mainModule.treeView.onDragStart = e -> 0

The dragged item is still highlighted with this fix. I suspect that’s the fault of CSS, not JavaScript.