Setting the working directory to the directory of current open file as default?

#1

Hello,

When I open a Julia file in Atom my working directory is automatically set to my HOME directory. Thus I have to either explicitly code: cd(dirname(@__FILE__)) or use the following command: Julia Client: Work in File Folder. Is there a way to avoid this altogether and make it default behavior? I believe this is similar to the issues #490 and #124 . Yet it seems to have been resolved in issue #124.
When I create the file Example.jl with the following code:

println(pwd())
cd(dirname(@__FILE__))
println(pwd()) 

inside and run it I get the following output in the REPL below:

C:\Users\adurmus
C:\Users\adurmus\Desktop\Folder #1

0 Likes

#2

What is the project folder? In other words, when you look at tree view (usually the view of files and folders on the left part of the window) are you seeing all the folders in your home folder or just Folder #1?

0 Likes

#3

So when I open up a julia file in Atom by just double clicking it, no tree view pane shows up. When I select Tree View:Toggle command, a project pane pops up but I am not seeing any folders inside it. Here is a screenshot of what I am seeing:

0 Likes

#4

Try adding a project folder there, or else right-click the folder of the project you’re working on and open it in atom. I’m guessing that because there’s no project folder, Juno is just defaulting to $HOME.

0 Likes