I need some functions like:
VS Code -> F1 (open Command Palette) -> OpenFileFeature: /home/user/blablabla/code.py -> (Enter) -> (file opened in editor)
In this case /home/user/blablabla/code.py can be an external file (relative to my current folder open in VS Code).
Does anyone know some tricks about this?
In vscode you can use the command palette to open files via absolute path using the CTRL + P shortcut. Please note the difference. CTRL + P opens the file navigator whereas CTRL + SHIFT + P opens the editor command window, meaning you will see the >
indicator. Additional note - you could just simply delete the >
identifier as well, if using the command shortcut.
The file navigator takes absolute paths as arguments, once you filled out a file that exists it will populate in the drop down list for selection:
Notice how I do not have any workspaces open so there is no navigation history or relative file association.
Alternatively,
There is naturally the option to open via CTRL + O, where you can always enter absolute paths as well, not a command palette related answer but related option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With