Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>open-file-commandNew to Visual Studio Code? Get it now.
open-file-command

open-file-command

tgreen7

|
262 installs
| (0) | Free
Adds a command which can be used by keyboard shortcuts to open any file
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

open-file-command README

adds the command open-file-command.openFile which can be used to open any file with a keyboard shortcut.

How to Use

Add a a keyboard shortcut:

{
  "key": "ctrl+m",
  "command": "open-file-command.openFile",
  "args": ["~/.vscode/notes.txt", 6, 3]
},

The args take in a path, line number (optional), and cursor position (optional). The path should be absolute.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft