Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

How do I make atom open the working directory by default? #6873

Closed

Description

@CharlesSocial

Recently atom has changed to require atom . instead of just atom to open the working directory. This has been a really frustrating change. How do I make atom open the working directory without the . argument?

Activity

  1. mnquintana commented on May 20, 2015

    @mnquintana
    Contributor

    You could always make a shell alias and add it to your ~/.bashrc or ~/.bash_profile:

    alias atom="atom ."
  2. jrjohnson commented on May 20, 2015

    @jrjohnson

    👍 Using an alias doesn't work because I also do atom /foo/somefile.txt

  3. maxbrunsfeld commented on May 20, 2015

    @maxbrunsfeld
    Contributor

    make a shell alias and add it to your ~/.bashrc or ~/.bash_profile

    Yeah, this is the solution that I recommend for people who prefer the old behavior.

    I'm sorry for changing the shell command's behavior out from under you @CharlesSocial. The reasons that we felt it was right to make this change before Atom 1.0 are:

    • It makes a commonly-desired behavior available from the command-line
    • The old behavior is still very easy to achieve, using atom .
    • It matches the behavior of other popular editors: Sublime Text and TextMate
  4. maxbrunsfeld commented on May 20, 2015

    @maxbrunsfeld
    Contributor

    @jrjohnson To support your desired behavior, you might want to make a shell script like this:

    #!/bin/bash
    
    if [ "$#" -eq 0 ]; then
      \atom .
    else
      \atom $@
    fi
  5. chloerei commented on May 21, 2015

    @chloerei

    vim will open in current directory. I think it's annoying if I have to enter ls . instead of ls.

    I set alias a='atom .' that I can use original command if necessary.

  6. mark-hahn commented on May 21, 2015

    @mark-hahn
    Contributor

    I think it's annoying if I have to enter ls . instead of ls.

    How does vim re-open the same setup?

    On Wed, May 20, 2015 at 8:46 PM, Rei [email protected] wrote:

    vim will open in current directory. I think it's annoying if I have to
    enter ls . instead of ls.

    I set alias a='atom .' that I can use original command if necessary.

    —
    Reply to this email directly or view it on GitHub
    #6873 (comment).

  7. chloerei commented on May 21, 2015

    @chloerei
  8. motam commented on May 21, 2015

    @motam

    See #6605 as well.

  9. CharlesSocial commented on May 21, 2015

    @CharlesSocial
    Author

    What do you guys mean by "open the previous setup"? Right now atom always opens a new file window. I'm not sure I understand the decision because this seems much less convenient than opening the working directory.

  10. piranna commented on May 21, 2015

    @piranna

    Maybe other editors wotk this way, but it's a bad decission. It would make sense to restore the last session when executing from an app launcher like Gnome Menu, but from command line, common sense dictates that by default it will open on the current directory. The best approach to this is to add a "restore session" command line argument and launch Atom from Gnome Menu with it.

  11. CharlesSocial commented on May 21, 2015

    @CharlesSocial
    Author

    Honestly the alias doesn't work well at all, and setting up a bash script is fine, but feels a little ridiculous.. If there are people on both sides of the fence then this should be a checkbox setting.

    Note: Saving the open files is not important, I just found it really convenient to be in the working directory project.

    I suppose my comments sound a little negative when looking back at them. I really like atom and think you guys are doing an awesome job. With anything though, it's really aggravating when simple and super common behavior like this is changed for seemingly arbitrary reasons.

  12. lock commented on Jan 22, 2019

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  13. locked as resolved and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions