IntelliJ IDEA 2017.1 Help

Opening Files from Command Line

On this page:

Opening a file in the editor

IntelliJ IDEA helps opening a file for editing so that the caret rests at the specified line.

To open a file for editing

  • In the command line, type the following:
    <IntelliJ IDEA> <path1> --line <number> <path2>
    • <IntelliJ IDEA> is the platform-specific product launcher
    • <path1> is the path to the project that contains the desired file
    • <number> is the number of the line, where the caret should rest
    • <path2> is the path to the file to be opened



IntelliJ IDEA.exe C:\SamplesProjects\MetersToInchesConverter --line 3C:\SamplesProjects\MetersToInchesConverter\src\javascript\numbers.js


/Applications/IntelliJ ~/IntelliJ IDEAProjects/untitled45 --line 1 ~/IntelliJ IDEAProjects/untitled45/sample.sass
Last modified: 18 July 2017