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

Allow either / or \ as path separators regardless of platform #61

Open
antonburger opened this issue Sep 7, 2019 · 1 comment · May be fixed by #65
Open

Allow either / or \ as path separators regardless of platform #61

antonburger opened this issue Sep 7, 2019 · 1 comment · May be fixed by #65

Comments

@antonburger
Copy link

When creating new notes, it seems needlessly restrictive to require path separators to match the default used by the OS. See also #39.

  1. Plenty of tools, including core VSCode functionality (e.g. the explorer.newFile command), as well as 3rd party ones like PowerShell, allow the use of either slash interchangeably. I mostly use Windows, but English keyboard layouts tend to a) keep / in the same place, with less variation in position across US/UK layouts than \, and b) make / easier to reach. Along with not having to escape things as often, these mean it's really handy being able to use / when it's supported.
  2. Using the "wrong" separator currently results in creation of new directories anyway (nobody really wants to include either slash in a filename, right?) but with the tokens incorrectly expanded in the directory name rather than the note filename.

VSNotes 0.7.1, VSCode 1.38.0, Win10

@Ragnoroct Ragnoroct linked a pull request Oct 24, 2019 that will close this issue
@Ragnoroct
Copy link

I've created a PR to fix this. I've set it up so that the first separator found is the one used.

So input of my/separated/note\with\both is interpreted as my/separated/note/with/both
And my\separated/note\with\both is interpreted as my\separated\note\with\both

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants