ItelliJ IDEA can be called from command line on a single file - as described in here:
However, it seems that you have to provide IntelliJ with a project, as described here:
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
Is there a way of using a "light version" of IntelliJ IDEA as a pure file editor, without a project?
IntelliJ IDEA is especially good editor for some file types, such as Java, XML, HTML, ... I'd like to associate it with these types and use it from Total Commander, but currently Idea opens too slowly with all the project overhead. And I sometimes need to edit files across the projects.
UPDATE: It's now supported using the LightEdit mode.
Original answer:
It's not possible at the moment, there is a related request (created 11 Dec 2010), you can vote for:
Since IntelliJ IDEA 2020.1, there is LightEdit Mode. It's really light :)
LightEdit mode lets you use IntelliJ IDEA’s text editing features without creating or opening a dedicated project. In LightEdit mode, a file is opened in a separate editor window which may coexist with other (project) windows.
The mode has certain limitations: it offers simpler code completion (or sometimes none at all), no code inspections, only basic code highlighting that doesn’t require sophisticated code analysis, and so on. But if you just need to open a single file, make a few changes, and save, LightEdit is the quickest way to do it, and you don’t have to use a third-party editor either.
The upcoming JetBrains Fleet editor should fit the bill, when it is eventually released (probably some time in 2022). LSP is probably the greatest recent invention in the area of programmer tooling. I'm glad Microsoft spearheaded it sufficiently and it is now seeing adoption from JetBrains.
In the meantime, there is LightEdit mode, or simply switch to some other editor for the task.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With