[help] How to open/create files by typing path?
Sorry if there's a better sub for VS Code questions, or flair or something I should apply to this post.
I'm a 15-year Vim user taking VS Code for a spin and loving it so far (with Vim extension, of course) but I'm having trouble trying to create/edit files.
Ideally I would hit a shortcut, type a file path like~/Desktop/some-file.py and hit enter to create/edit the file with path completion via tab if necessary.
Nothing like this works, tab causes the open/command palette to lose focus and even without tabbing VS Code doesn't seem to recognize tilde or really do anything as I would expect with regards to files.
Is there any way to open/edit files or folders from VS Code without using the mouse? One-offs that might not be open in Explorer.
Posted May 3, 2017, 11:01 PM UTC
There's an extension for this: Advanced new file
edit: actually there are two: the other one
If you search for "file" in the extension sidebar, they show up.
Thanks for the suggestions! Unfortunately neither plugin does quite what I'm trying to accomplish and the former had an issue with
~and was project-relative.What I've settled on for now is:
codein $PATH (which creates a symlink in/usr/local/bin)^`to open the built-in shellcode ~/some/file.txtThis way I still have tab completion, tilde works as expected and non-existing files or files outside the explorer path can be opened without issue.
I would love to have something like this via the command palette or some easier way to do this.
[deleted]
Why not ctrl-n ctrl-s and type the new file name? Backwards but easy enough.