Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"journal.base" should work cross-platform #38

Closed
PxlBuzzard opened this issue Jul 18, 2018 · 4 comments
Closed

"journal.base" should work cross-platform #38

PxlBuzzard opened this issue Jul 18, 2018 · 4 comments

Comments

@PxlBuzzard
Copy link

I would love to see support for:

  • journal.base.windows
  • journal.base.osx
  • journal.base.linux

The advantage of adding cross-platform path support hopefully comes with a secondary benefit of allowing the use of environment variables. The reason I thought of this is is that "journal.base": "%USERPROFILE%/Documents/Journal" failed to resolve correctly on Windows.

@pajoma
Copy link
Owner

pajoma commented Jul 19, 2018

Thanks for this suggestion, but I am not sure I fully understand the problem. Journal base should be a setting in the user properties, which is stored in the local user profile (regardless of the machine you are using). I have my notes synced on various linux and windows environments, each having its own base directory defined. Having separated path definitions by environment makes only sense if

  • you want to have the base path synced as well (which means you have to either sync your vscode profile directory or you put the base path in the workspace settings (which again means that you loose the journal if you switch workspaces))
  • you are able make sure that all windows machines share the same setup (and all posix).

Resolving environment variables like %USERPROFILE% is apparently not supported by NodeJS (whose Path I use to resolve the directory path. I could try to resolve them manually, but this might lead to whole new set of problems (e.g. different environment variables on different windows machines).

@PxlBuzzard
Copy link
Author

I use Settings Sync to keep my user settings synced across machines. I can use the same settings across OSs, and while it isn't the end of the world to not sync the journal it would still be an enhancement. Though since I'm asking, how do you sync your journal?

As for the environment variable problem, that's a bummer that Path doesn't support variable expansion but I wouldn't ask you to be the one to solve that if node hasn't done it.

Thank you for the response and I love all the work you've done making this extension. I started using it a couple days ago and I love it.

@pajoma
Copy link
Owner

pajoma commented Jul 22, 2018

Ok, I've updated the configuration to resolve the variable ${homeDir}, the path should also work cross-plattform now ("/" are replaced with "\" on windows machines).

I use resilio (bittorrent sync in the past) to sync my journal across my machines.

@pajoma
Copy link
Owner

pajoma commented Sep 23, 2018

Works in new version

@pajoma pajoma closed this as completed Sep 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants