VSNotes
VSNotes copied to clipboard
Allow either / or \ as path separators regardless of platform
When creating new notes, it seems needlessly restrictive to require path separators to match the default used by the OS. See also #39.
- Plenty of tools, including core VSCode functionality (e.g. the
explorer.newFilecommand), 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. - 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
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