Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a "light version" IntelliJ IDEA to edit files WITHOUT a project?

ItelliJ IDEA can be called from command line on a single file - as described in here:

  • Running IntelliJ IDEA as a Diff or Merge Command Line Tool
  • Intellij like Text Editor (which BTW does not answer my question!)

However, it seems that you have to provide IntelliJ with a project, as described here:

  • Opening Files from Command Line

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.

like image 216
Honza Zidek Avatar asked Mar 27 '17 11:03

Honza Zidek


3 Answers

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:

  • IDEABKL-5939 using IDEA as a general-purpose text editor
like image 97
CrazyCoder Avatar answered Oct 22 '22 11:10

CrazyCoder


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.

like image 24
Honza Zidek Avatar answered Oct 22 '22 10:10

Honza Zidek


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.

like image 28
user7610 Avatar answered Oct 22 '22 11:10

user7610