clutcher / bh

Issue tracker for Better Highlights Intellij IDEA plugin
6 stars 0 forks source link

Wikilinks to absolute files #100

Closed mgroth0 closed 3 months ago

mgroth0 commented 4 months ago

Is it possible? I am trying and it is not working.

clutcher commented 4 months ago

@mgroth0 In theory, yes, but I decided to not implement it. I think that such references would not work on others machines. Win vs Unix for some outside project files or different project initial folder for project files.

What is your uses case for absolue path?

mgroth0 commented 4 months ago

You're right. Absolute file paths links would not work, and would likely be bad to include, in shared code. Especially for portable shared software development projects .

But I have some code that I will likely never share, and likely never have on a different machine. I already reference files such as configuration or data files at times. This would just be a nice convenience.

For example, since I work in research much of my code is pointing to data files on differnet folders in my machine. The data files aren't always located inside my project fodlers, because the data folders can be so large and mulitple projects in different project folders on the machine can point to the same data.

Having a nice way to link to and open those files in Finder or even just in IntelliJ would be really convenient.

clutcher commented 4 months ago

@mgroth0 Why not to still use relative path? You can use ../ to get out of project dir. In my case - I put all the pojects and projects data under ~/projects. So from ~/projects/name/Process.java you can reference ~/projects/data/input.txt as [[../../data/input.txt]].

mgroth0 commented 4 months ago

Interesting idea. But wouldn't that break if the .java file moved? Also, it would not be easy to copy and paste that path anywhere or move the link anywhere else. An absolute path is like a constant ID, which I would usually prefer.

mgroth0 commented 4 months ago

For example, it would not be convenient to open up a quick terminal and call cat ../../data/input.txt. I would have to cd to the correct path first.

clutcher commented 4 months ago

Hmm... Ok, I'll think about that.

clutcher commented 3 months ago

@mgroth0 Would add that into next release.

clutcher commented 3 months ago

Released