How to open a file from a prompt using VS Code and go to a specific line number?

I want to integrate Visual Studio Code with some of my other tools, and part of this can run Visual Studio Code, passing in the file name, line number, and column number to position the cursor at a specific location in the file.

Is there any way to do this?

+6
source share
1 answer

With the new version 0.5.0, you can open one or more files in a row and column using the following syntax:

code -g file1:<line>:<column?> file2:<line>:<column?> file3:<line>:<column?> 
+5
source

Source: https://habr.com/ru/post/986973/


All Articles