atom / tree-view

🌳 Explore and open project files in Atom
MIT License
561 stars 364 forks source link

[RFE] Request for an option to prevent the 'Project' pane from opening on startup #1370

Open pneedle-rh opened 3 years ago

pneedle-rh commented 3 years ago

Summary

This is a request for an option to prevent the Project pane from opening when Atom is used to open a single file.

Motivation

I typically open single files in Atom from the command line, by using the following command:

$ atom <file>.adoc

I do this many times in a day and I jump in and out of different Git projects. I don't use the project features within Atom and prefer to navigate from the CLI and open files in Atom from there. Often I close Atom when I have finished editing a single file.

It seems that recently a change was introduced in Atom that results in the Project pane being open when Atom is started against a single file. The project pane states that "Your project is currently empty". This means that I have to close the project pane every time I open Atom, to be able to view a file in the whole Atom window.

It would be great to have the option to suppress the Project pane on startup, so that I don't have to close it numerous times per day.

Describe alternatives you've considered

  1. Using the CTRL+\ keyboard shortcut on Fedora, or CMD+\ on MacOS, to close the pane each time. This is not really a workaround, because I still have to do this many times per day. It is just quicker to do this rather than using the mouse to close the pane each time.

  2. Disabling tree-view in Edit -> Preferences -> Packages. This prevents the pane from opening when Atom is used to open a single file. However this is not a suitable long term solution because then the tree-view functionality is not available at all. It would be better to have the option to prevent the pane from opening on startup, but to still have it available to open when you need it.

pneedle-rh commented 3 years ago

Perhaps something like a 'Restore current pane configuration when Atom is restarted' option could resolve this. Or, you could instead add a more specific option in the preferences to prevent Tree View from showing on startup.

Another option would be to restore the previous behaviour. Before something like three weeks ago (IIRC), this was not an issue and the pane did not open every time I started Atom to view a file. This has been observed on Fedora 32 and MacOS.

pneedle-rh commented 3 years ago

Looking at the Atom Release Notes, I am pretty sure that this change in behaviour was introduced in Atom 1.53.0 through this tree-view pull request:

mortar-and-pestle commented 3 years ago

Looking at the Atom Release Notes, I am pretty sure that this change in behaviour was introduced in Atom 1.53.0 through this tree-view pull request:

* #1315 - Always show Tree View

@pneedle-rh

Yep.

Possible Drawbacks Tree View will now appear, even when no projects are open.

Hopefully, we can get the option to disable this functionality.

tcatlas commented 3 years ago

Yeah can we get an option to disable this?

I don't need Atom telling me how I can add a project every time I open it. I know how to do it if I need to. I mostly use Atom for single-file editing, and this stupid pane just adds to the bloat.

zekeadam commented 3 years ago

Its so annoying to have a tab auto open that I don't need 9/10 times

Oktopuce commented 3 years ago

Same for me I just use Atom to open single files and don't need the project pane and it's boring to always have to close it manually.

michaeljohns2 commented 3 years ago

I am coming back to atom after a year or so. I spent about 30 minutes in disbelief that I could not auto-hide the tree view on each start of atom. My pattern is similar to @DiscoveryOV and @pneedle-rh where I often open a single file and rarely open projects.

JohnGlassmyer commented 3 years ago

Forcing a little-used feature onto a valuable chunk of screen real estate, time after time, relentlessly, is perhaps not a great way to encourage use of the feature.

angstschweiss commented 3 years ago

I concur, it is supremely annoying having to manually close the tree view every time.

moritzpoll commented 3 years ago

Seconded. Tried everything in this thread and nothing seems to work anymore: https://discuss.atom.io/t/hide-treeview-by-default/7718/20. The brute force way is to go into setting and disable the package tree-view altogether. Since I practically never use it, that's my solution for now, but it's not a pretty one.

pokono commented 3 years ago

Pleeeaaaseeee, pretty pleeeaaassseeee!!

I got all my co-workers into Atom over the last year and now they hate me!! We use it mostly for scratch files and that pane is really annoying.

giorgioskij commented 3 years ago

I've just spent the past hours trying to prevent that damn pane from auto opening, at least now I know I'm not alone.

Please give us the option to have it hidden on startup, I feel like this is literally the only thing preventing atom from being the best go-to text editor!

nuoxoxo commented 3 years ago

Now i'm done trying to hide the pane and back to work. Fortunately it's quick on mac. cmd+\ will do it, but have to do it everytime

zekeadam commented 3 years ago

I had enough of atom's annoyance's and switched to vs code, glad I did

tcatlas commented 3 years ago

I had enough of atom's annoyance's and switched to vs code, glad I did

I can't remember the reason I switched from VS Code to Atom, I feel like it was speed related or maybe Atom's ease of extension install - but regardless this is damn annoying for sure. All we need it for someone to submit a PR removing it by setting, but I am unfortunately not that guy. Anyone?

starcatter commented 3 years ago

+1 As a new user when I opened a file I was greeted with 2/3 of my screen taken up by project pane and welcome messages, neither of which I had any interest in. At this point I don't care what the editor can do, I just want to work on the file I opened, I'm capable of looking for extra features when I need them.

I suggest showing the welcome/project panes if the editor was started with no files specified, and otherwise only showing the project pane if the file being opened belongs to a project.

slugrustle commented 3 years ago

I just switched from Visual Studio Code to Atom because the former was bombarding me with dialogs about protected mode tabs. I just want a text editor to edit text files with, not bombard me with unwanted dialogs.

Atom is great except for this useless pane opening every time. Glad I could disable it entirely, wish I could just start Atom with it minimized.

joaotmartins commented 3 years ago

Probably this needs to be fixed in tree-view package. There's already an issue open there (1375)

smenor commented 3 years ago

I'm desperately itching for this hidden on startup feature to be released because I literally never want that pane and have to hide it every time Atom starts up

dima-y commented 3 years ago

Another vote for this feature.

graziosov commented 3 years ago

Another vote for this feature. Please !

joaotmartins commented 3 years ago

The fix is already in tree-view package release v0.229.0. I was waiting for it to be picked up here by the maintainers, but if it isn't I'll submit a pull request for updating the package references.

stefmikhail commented 3 years ago

The fix is already in tree-view package release v0.229.0. I was waiting for it to be picked up here by the maintainers, but if it isn't I'll submit a pull request for updating the package references.

For some reason my Atom on OSX won't update to that version: it is saying v0.228.3. Am I doing something wrong that I can't update to v0.229.0? I'm so annoyed by that Project panel always appearing when I just want to edit a file. lol

joaotmartins commented 3 years ago

For some reason my Atom on OSX won't update to that version: it is saying v0.228.3. Am I doing something wrong that I can't update to v0.229.0? I'm so annoyed by that Project panel always appearing when I just want to edit a file. lol

Probably because the latest release of Atom (1.58.0) still lists v0.228.3 in its dependencies. I'll submit a pull request to update it soon.

palbera commented 3 years ago

For some reason my Atom on OSX won't update to that version: it is saying v0.228.3. Am I doing something wrong that I can't update to v0.229.0? I'm so annoyed by that Project panel always appearing when I just want to edit a file. lol

Probably because the latest release of Atom (1.58.0) still lists v0.228.3 in its dependencies. I'll submit a pull request to update it soon.

Hi there, any news about the pull request? I updated ATOM to 1.58.0 on my Mac but the tree-view package is still v0.228.3 Thanks in advance

joaotmartins commented 3 years ago

Hi there, any news about the pull request? I updated ATOM to 1.58.0 on my Mac but the tree-view package is still v0.228.3 Thanks in advance

See PR atom/atom#22800 linked just before your comment. It has been merged into master, so it will likely come out with Atom 1.60.

xanoni commented 3 years ago

This is the No. 1 most annoying thing about Atom. I use it as a notepad replacement when I'm in the GUI, not as my main IDE. I only edit single files with it (e.g., scripts), so I don't need it to show me "projects". The first thing I do after launching Atom is to press the shortcuts to close the side-pane.

Good that this is getting fixed soon.

EDIT: Haha, I found this ticket via $search_engine and just realized that this is not the main Atom repo, but just a plugin/addon that I can disable. Problem solved.

beyondcompute commented 3 years ago

It’s really surprising that the default behavior is like this in the first place (when one opens a file from command line an empty project pane is shown). 🤔

cstout1 commented 2 years ago

+1, don't use or plan to use project pane. Would love to disable it showing by default.

jmredfern commented 2 years ago

I also don't use the tree view and removed the package. It'd be great to be able to hide it by default!

joaotmartins commented 2 years ago

Created PR #1396 to fix an implementation error, where sometimes the pane wouldn't be hidden when starting up.

ladar commented 2 years ago

@angstschweiss @beyondcompute @cstout1 @dima-y @DiscoveryOV @giorgioskij @graziosov @jmredfern @JohnGlassmyer @michaeljohns2 @moritzpoll @nuoxoxo @palbera @pneedle-rh @pokono @slugrustle @smenor @starcatter @stefmikhail @xanoni

Hi everyone. I know this feature will eventually trickle down to us, the indigent userbase., but for those of us that don't feel like waiting (like myself), just add the snippet below to your Atom init file. It will collapse (aka hide) the tree view pane automatically when Atom starts. Since the package isn't disabled, you can still reveal the tree view pane using the menu option, the keyboard shortcuts, or the arrow that appears when you move your mouse to the right spot.

To use this workaround, you can either create (or edit) an init.coffee file in your Atom home directory, or if you don't know where that is, you can simply launch Atom and select Edit -> Init Script. Once you have the file open, paste the text below into your init file and enjoy.

waitForPackageActivation = (causeTreeToggle) ->
  disposable = atom.workspace.onDidOpen ({item}) ->
    atom.commands.dispatch atom.views.getView(atom.workspace), 'tree-view:toggle'
    disposable.dispose()
waitForPackageActivation()
ladar commented 2 years ago

I updated the above snippet. It seems the original version created a race condition that made it hard to reveal the tree view using the shortcuts/menu. The updated version should work better for ya'll.

dima-y commented 2 years ago

Thanks ladar, that works! (Minor point, at least on Windows, it is not Edit -> Init Script, it is File -> Init Script.)

NuCNCV commented 2 years ago

@angstschweiss @beyondcompute @cstout1 @dima-y @DiscoveryOV @giorgioskij @graziosov @jmredfern @JohnGlassmyer @michaeljohns2 @moritzpoll @nuoxoxo @palbera @pneedle-rh @pokono @slugrustle @smenor @starcatter @stefmikhail @xanoni

Hi everyone. I know this feature will eventually trickle down to us, the indigent userbase., but for those of us that don't feel like waiting (like myself), just add the snippet below to your Atom init file. It will collapse (aka hide) the tree view pane automatically when Atom starts. Since the package isn't disabled, you can still reveal the tree view pane using the menu option, the keyboard shortcuts, or the arrow that appears when you move your mouse to the right spot.

To use this workaround, you can either create (or edit) an init.coffee file in your Atom home directory, or if you don't know where that is, you can simply launch Atom and select Edit -> Init Script. Once you have the file open, paste the text below into your init file and enjoy.

waitForPackageActivation = (causeTreeToggle) ->
  disposable = atom.workspace.onDidOpen ({item}) ->
    atom.commands.dispatch atom.views.getView(atom.workspace), 'tree-view:toggle'
    disposable.dispose()
waitForPackageActivation()

Frustratingly this doesn't work on Mac, Atom v 1.58

Atom -> Init Script -> Paste Code -> Pane still loads on open

progonkpa commented 2 years ago

The init.coffee unfortunately doesn't work for me either on Manjaro.

NateAtB4 commented 2 years ago

Yes, would be great to have the project pane disabled on MacOS. I only use it for single file edits and open it from the command line. Seems unusually for it to take this long to get something simple resolved.

Jas0n99 commented 2 years ago

Even though Atom is up to 1.59, and treeview on github is up to 0.229.1, Atom still is at 0.228.3 and refuses to update.

I've been suffering for almost 3 years of that annoying project pane ALWAYS THERE IN YOUR FACE when trying to just do a quick edit on a single text file. I don't want to disable it completely as I do use it when working on github projects.

jawanns commented 2 years ago

Please, please, please provide a native method for disabling the project pane at startup in macOS. Literally never use it.

mycosavant commented 2 years ago

i've been annoyed with this feature for a couple of weeks and finally decided to search for a solution. It's good to see that i'm not the only one, but a little disheartening that it's been going on so long without a real solution.

smenor commented 2 years ago

I just ended up switching to MS Code and am much happier now

Le 26 févr. 2022 à 18:05, mycosavant @.***> a écrit :

 i've been annoyed with this feature for a couple of weeks and finally decided to search for a solution. It's good to see that i'm not the only one, but a little disheartening that it's been going on so long without a real solution.

I'm also having the outline pane open every time now and can't figure out why. It's very frustrating to say the least

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

progonkpa commented 2 years ago

Yup, me too. I will not let my software bully me.

Jas0n99 commented 2 years ago

I give up. Even with the 1.60.0 update and treeview is finally at 0.229.1 even if you check the box in treeview it's still appearing every time I try to edit a single file or even just open atom with no file! Switching permanently to MS Code.

cstout1 commented 2 years ago

I'm sorry to say that VS Code has stolen my heart as well.

rFalque commented 2 years ago

@angstschweiss @beyondcompute @cstout1 @dima-y @DiscoveryOV @giorgioskij @graziosov @jmredfern @JohnGlassmyer @michaeljohns2 @moritzpoll @nuoxoxo @palbera @pneedle-rh @pokono @slugrustle @smenor @starcatter @stefmikhail @xanoni

Hi everyone. I know this feature will eventually trickle down to us, the indigent userbase., but for those of us that don't feel like waiting (like myself), just add the snippet below to your Atom init file. It will collapse (aka hide) the tree view pane automatically when Atom starts. Since the package isn't disabled, you can still reveal the tree view pane using the menu option, the keyboard shortcuts, or the arrow that appears when you move your mouse to the right spot.

To use this workaround, you can either create (or edit) an init.coffee file in your Atom home directory, or if you don't know where that is, you can simply launch Atom and select Edit -> Init Script. Once you have the file open, paste the text below into your init file and enjoy.

waitForPackageActivation = (causeTreeToggle) ->
  disposable = atom.workspace.onDidOpen ({item}) ->
    atom.commands.dispatch atom.views.getView(atom.workspace), 'tree-view:toggle'
    disposable.dispose()
waitForPackageActivation()

It kind of solves the problem on my side (ubuntu) ... still disabling it to edit single files would be great

JinhaPark commented 2 years ago

@rFalque Very helpful solution. Thank you

rFalque commented 2 years ago

For some reasons, the previous fix I quoted does not work anymore but the script described there works when used in the init.coffee file.

atom.workspace.onDidOpen ({item}) ->
  itemName = item.constructor.name
  if (itemName  != 'TreeView') # no action if open TreeView intentionally
    dock = atom.workspace.paneContainerForURI('atom://tree-view')
    if dock && dock.isVisible()
      dock.hide()

That said I noticed there is an option Hidden on startup in the tree-view package. It does not seems to work properly tho.

joaotmartins commented 2 years ago

My fix to the original implementation (#1396 ) has finally been merged into master, hopefully this will make it into a next tree-view release.

smenor commented 2 years ago

It’s such a shame that took so long.

I used Atom for so long but now have fully switched to VS Code over this and can’t imagine going back

Le 25 mars 2022 à 05:13, joaotmartins @.***> a écrit :

 My fix to the original implementation (#1396 ) has finally been merged into master, hopefully this will make it into a next tree-view release.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

pneedle-rh commented 2 years ago

My fix to the original implementation (#1396 ) has finally been merged into master, hopefully this will make it into a next tree-view release.

@joaotmartins thank you!