File tree sidebar

How to make the file tree sidebar to auto sync the file location and list all current files in the open file location

ex. If I open file from /home/code/network/n.rb another one from /home/code/web/w.rb 

the needed behavior is once I click the w.rb file tab, all files in web directory, get listed in the left sidebar sam with n.rb

 

 

0
7 comments

It seems you haven't attach content root pointing to the 'web' directory - I don't see it in the 'Project tree' view on the left. Please add it as described here - https://www.jetbrains.com/help/ruby/2016.2/configuring-content-roots.html

Also, please don't forget to enable "Autoscroll from source" setting as described above.

1

Hello, King,

 

do you mean 'Autoscroll from source' option?

0
Avatar
Permanently deleted user

Here an example from Kate (KDE text editor) I've open tow files in two different directories, once I open the file, it lists all files in the opened file directory

 

Notice all files in 'network' directory got listed 

Notice all files in 'web' directory got listed 

In Rubymine whoever, I've opened 'n.rb' file from 'network' directory, then opened 'w.rb' from 'web' directory. However, neither the rest of files in network, nor the web directory, get listed when I open 'n.rb' or 'w.rb'

 

 

0
Avatar
Permanently deleted user

Hi Dmitry

>> "It seems you haven't attach content root pointing to the 'web' directory - I don't see it in the 'Project tree' view on the left. Please add it as described here"

Exactly! , that's the point I don't want to add a directory to see all files in that directory, I want to open a file and at the same time, Rubymine list all files in that directory 

I've enabled the "Autoscroll from source" and it doesn't do what I was looking for 

Regarding to the link, here is the what I meant, can I make Rubymine detects the "Content Root" automatically? 

So if I open /home/User/Code/network/n.rb, Rubymine automatically detect the"Content Root" as /home/User/Code/network/ so it can list all that path contents

I just want to make sure I've explained my issue clearly.

0

Actually you can mark entire 'Code' folder as content root and exclude not needed subdirectories by marking them as 'excluded'.

0
Avatar
Permanently deleted user

Should I go to "Content Root" settings to do so, can it be automatically? 

 

When I open the file by double-click it it shows the path as "/tmp/n.rb"

is that has anything related to this issue? Or it's just the temp path for autosaving? 

0

If you open a single file in RubyMine from the file manager it's suggested that it's for viewing/editing and this file doesn't really belongs to the project you are working with and thus won't be added to content roots/project view.

In the beginning of working with a project you should configure its content roots manually - mark all project-related directories and exclude subdirectories if they aren't needed.

0

Please sign in to leave a comment.