command to open file at line number
See original GitHub issuesuggested by @jkaster
Currently a file can be opened in an existing window: #1994
VS Code itself supports opening a file with line number with the -g (goto?) flag (see microsoft/vscode#39891):
code -g file.txt:4
# works :)
code-server -r -g file.txt:4
# error Unknown option -g
It would probably make sense to reuse this schema.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Vim Open File And Go To Specific Function or Line Number
The Vim goto line number command. One can use the G letter. For example, press [ESC] key and type 10G (Shift-g) goto line...
Read more >linux - How can I open a file with line numbers displayed from ...
You can use: vi +"set number" your_file.
Read more >Going to a specific line number using Less in Unix
To open at a specific line straight from the command line, use: ... This will open a file displaying the line numbers and...
Read more >How to Open File at a Specific Line Number in Notepad++
Here's how you can directly open a file at a specific line number in Notepad++ when launched from the command line or via...
Read more >Opening a file from command line with line number (--goto) is ...
Try to open it with code with a specific line number, such as code test.txt:3. Expected behavior: Code opens test.txt and places cursor...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It would be great if this feature will be implemented. There was already lots of requests, but it wasn’t implemented yet. #1292 and #2179 was closed.
I hope this gets implemented some day, since it was deemed relatively easy and it would be great for integration