Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>File CursorNew to Visual Studio Code? Get it now.
File Cursor

File Cursor

He Li

|
82 installs
| (0) | Free
Use Ctrl+Left Click "filename:line" like string in a opened file to navigate to the location
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Open File At Line

This is a Visual Studio Code extension that allows you to jump to a specific file and line number from a text selection in your editor.

Features

  • Select a text in the format path/to/file:lineNumber and use the command to open the file and jump to the specified line number.
  • Works with absolute and relative file paths.

Installation

  1. Install Node.js and npm if you haven't already.
  2. Install Yeoman and the VS Code Extension Generator:
    npm install -g yo generator-code
    
  3. Generate a new extension:
    yo code
    
  4. Clone this repository or copy the necessary files into your new extension directory.
  5. Install dependencies and compile the extension:
    npm install
    npm run compile
    

Usage

  1. Open a text file in VS Code.
  2. Select a text in the format path/to/file:lineNumber.
  3. Use the command Open File At Line to open the file and jump to the specified line number.
    • You can bind this command to a shortcut like Ctrl+Click for quick access.

Example

If you have a text like nvas.statistics.part79:46630 in your file, select it and execute the Open File At Line command. The extension will open ./nvas.statistics.part79 and jump to line 46630.

Development

Running the extension

  1. Open the extension project in VS Code.
  2. Press F5 to open a new VS Code window with the extension loaded.
  3. Test the extension by selecting text in the specified format and using the command.

Contributing

Feel free to fork this repository and submit pull requests. For any issues or feature requests, please open an issue on GitHub.

License

MIT

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