使用命令行在 intellij 编辑器中打开文件

Open file in intellij editor with command lines

我在 windows 上使用带有 git bash 终端的 intellij。

我可以使用 vim 来读取文件,但我真正想要的是在 intellij 编辑器中直接打开文件的命令。 我确实看过官方文档,但没有找到任何相关信息。

知道如何实现吗?

干杯

来自Working with IntelliJ IDEA Features from Command Line

Opening file in the editor

To open file for editing. In the command line, type the following:

<IntelliJ IDEA> <path1> --line <number> <path2>

where:

  • <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