LightEdit Mode

What is LightEdit Mode?

As we talked about in an earlier blog post, 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.

How does it work?

If you have an `idea` launcher script (Linux/MacOS) or `idea(64).exe` (Windows), you can open any file just by passing it as a parameter to the launcher:

The same can be accomplished if a file is associated with the launcher script or executable in a system file manager. Then, click on a file, for example in Windows Explorer or Finder, to launch IntelliJ IDEA with the file opened in LightEdit mode:

There is one exception though: if the project to which the file belongs is already open, it will be opened in the project window as usual, that is, LightEdit mode will not activate.

Note: When IntelliJ IDEA is already running, the launcher doesn’t start another instance, but only makes the already running process create an editor window.

Git integration

Basic Git integration is available at the moment. If you open a file in the Git repository, you’ll see a widget showing the current Git branch. Changes to the file are also shown in the editor, similar to usual project mode. Expect more things to come in the future such as Git history, commits, and so on.

Switching to Project mode

Whenever you feel a few simple changes won’t be enough, and you need to use the capabilities of a full-blown IDE, you can switch to project mode right away. Go to File | Open File in Project…, or select Open File in Project… from the context menu, or choose the “Open File in Project” intention by using Alt+Enter:

If the file is already under a project root, the project will be opened and an editor tab with the file will appear there. If not, you will be prompted to choose a root directory where an IntelliJ IDEA project will be created. The IDE will attempt to find a good location for the project root based on the presence of a Git repository, Gradle build files, and so on. But in any case, you can change it before creating the project.

The future

We will continue to enhance LightEdit in future IntelliJ IDEA releases so that you can do even more in a projectless mode. And of course, hearing back from you is really important. If you have an improvement idea or run into a usability problem, please let us know by creating a YouTrack ticket. Thanks!

Happy Developing!

Comments below can no longer be edited.

45 Responses to LightEdit Mode

  1. Avatar

    Volodymyr says:

    April 7, 2020

    How can I disable it? I want `idea` launcher script to open a file as it did in previous versions.

    • Avatar

      Thomas Bigger says:

      April 7, 2020

      Would like a way of opening it, without overriding existing functionality of idea command

    • Avatar

      OlegYch says:

      April 7, 2020

      ditto, i’m not sure why is it needed since i always have IDEA open

    • Avatar

      Tesla Zhang says:

      April 7, 2020

      Doesn’t this new feature open a file with `idea` launcher? I don’t understand you

      • Avatar

        Eric Meyer says:

        June 9, 2020

        Thank, I have been struggling with this for weeks.

        Just to give context of why this feature doesn’t work for me:

        I am writing python to parse large sets of data. I often want to open files out of the datasets that I am working on. I will open the terminal window in pycharm, navigate to the data and the type “charm ” with the hopes that the file will open in the same window as the terminal is running in.

  2. Avatar

    GGC says:

    April 7, 2020

    Having IDEA easily accessible from my terminal prompt is pretty sweet! I’m often wandering around in the terminal and want to open a file. That it chooses the already-open IDEA window is nice, too, as that’s probably where I’d want it anyway. (Granted, I was mislead by the “Already running” message. I assumed that meant it didn’t open the file. Perhaps say “Opening [foo.txt] in already-running workspace” or something?)

    Cool feature guys!

    • Avatar

      Eugene Morozov says:

      April 20, 2020

      It’s not supposed to give you any warnings, so it must be a misconfiguration.
      What OS are you using and how exactly you created the script you are passing the file to?

  3. Avatar

    Joshua says:

    April 7, 2020

    Have you considered compiling IntelliJ in Graal?

    • Avatar

      Joe says:

      April 8, 2020

      What would be the benefit?

      • Avatar

        Leanid says:

        April 9, 2020

        Startup time should be much better

        • Avatar

          Areeb Jamal says:

          April 18, 2020

          Not unless it is native image which is not possible yet due to the amount of reflection and other reasons. And the performance is also worse than JVM

  4. Avatar

    Zy says:

    April 8, 2020

    I’ve been hoping for a feature like this for a really long time! Look forward to code formatting features to be added. I think maybe a dedicated executable for launching the light version would be better. Great initial work on this, jetbrains team!

    • Avatar

      MarTinazzI says:

      April 9, 2020

      Me too, now I can retire the sublime Text

  5. Avatar

    MarTinazzI says:

    April 9, 2020

    I’m tried this, but got a error:

    Traceback (most recent call last):
    File “/usr/local/bin/idea”, line 107, in
    File “/usr/local/bin/idea”, line 102, in start_new_instance
    os.execv(RUN_PATH, [bin_file] + args)
    FileNotFoundError: [Errno 2] No such file or directory

    • Avatar

      Eugene Morozov says:

      April 20, 2020

      Try re-generating the command-line launcher script, it seems to be outdated.
      If that doesn’t help, please contact support (Help | Contact Support).

  6. Avatar

    t says:

    April 9, 2020

    I have been wanting a JetBrains replacement for notepad++ for a while, this is the first step I have seen that that might actually happen. If I could open a whole version-controlled directory in light edit mode, so that I could text search the whole thing and bounce between files quickly, that would be all I want in it.

    • Avatar

      Krystian Panek says:

      April 15, 2020

      I am also thinking about a replacement for notepad++.

      How about adding to the IntelliJ option to add Windows Explorer context menu entry / the same which has Notepad++?

  7. Avatar

    Christian von Wendt-Jensen says:

    April 10, 2020

    I’ve been wanting this for a long time. I just downloaded and tried it out on my mac (Version 2020.1 (IU-201.6668.121)) – it doesn’t work 🙁

    I created a CommandLine Launcher, and tried to open different files. Idea is brought into focus, but the file is not opened.

  8. Avatar

    SM says:

    April 10, 2020

    How can I submit a git messages/commits using this as my editor?

    • Avatar

      Artem Sarkisov says:

      April 20, 2020

      As of now, you’ve got to use the general mode of the IDE for such a task.

  9. Avatar

    antiloop222 says:

    April 10, 2020


    Thanks for adding this excellent feature ! On my side, to definitively uninstall my second editor, I would also need the ability to open a directory in LightEdit mode (no interpretation of the content, no IDEA project creation, just the ability to select and update files located in this directory), just like SublimeText is doing for example.

    Keep up the good work !

  10. Avatar

    Fares says:

    April 11, 2020

    How do I add the “idea“ feature to my bash on Mac? Thanks!

  11. Avatar

    Jan Vondrouš says:

    April 13, 2020

    Feature sounds great – considering that starting full idea take a really long time. – But I am afraid – it will have very very few users, because idea is not automatically on classpath after installation.
    I need to install IntelliJIdea, write “idea” and it must work like “code” does. Most of my colleagues will not do any additional configuration 🙁

  12. Avatar

    Lucian says:

    April 13, 2020

    Too bad you can only edit existing files. Would be nice if you could start with a new file as well.

    • Avatar

      Ian Fieldhouse says:

      April 14, 2020

      You can just touch a file before using the idea command. Slightly more convoluted but works fine.

      • Avatar

        Elliot Ford says:

        May 1, 2020

        I’m on macOS, and have made my idea command line launcher touch its argument if it receives a single argument that isn’t already a file:

        idea() {
        # if there’s a single argument
        if test $# -eq 1
        # and that argument isn’t an existing file
        if test ! -e $1
        # touch it to create a new file
        touch $1

        open -na “IntelliJ IDEA CE.app” –args “$@”

  13. Avatar

    pacm says:

    April 14, 2020

    Installed this version today and found two annoying issues.
    1.) My Kotlin JUnit files are not recognised. I’m getting JUnit not found in module when I add the configuration.
    2.) My custom live template is broken. If I put the variable $END$ inside quotes, the cursor goes to the start of the line.

  14. Avatar

    pacm says:

    April 14, 2020

    My apologies, kindly disregard my last comment. It was caused by a bad plugin. All good now.

  15. Avatar

    Ivan says:

    April 14, 2020

    Windows. Opened file gt730.html from C:\Users\%USERNAME%\Desktop … No CSS highlighting ..

    NO! I’m NOT asked! Instead it just creates (as it has always done, taking lots of cpu and space in vain (in an endless loop maybe) ) project (.idea folder) in C:\Users\%USERNAME%\ opens it and starts indexing…

  16. Avatar

    Muhammet says:

    April 15, 2020

    Thanks for the PyCharm editor. I have been using it for about 1 year for Python.

    I have just upgraded to 2020 version and disappointed. It opens single files in LightEdit by default.
    I would like to disable LightEdit, and open single files in the full editor, as before.
    In the 2019 release, I was able to use all the functions of the full editor AND was able to RUN the python files.

    Now, with the 2020 release, single files open in LightEdit by default.
    LightEdit is not different from a very simple text editor. What is the use?

    I would like to disable LightEdit, and use pycharm as before. How to do this?


      • Avatar

        Muhammet says:

        May 7, 2020

        I saw that, but did not understand how to do it. Is there a better explanation? Can someone explain it more clearly? Where do we do these? I cannot find them in PyCharm.

        “If you permanently want to go back to the previous behavior, you can do this by setting a registry key:

        Invoke Find Actions (or double shift/choose Actions tab)
        Search for “Registry…” action and select it.
        In the Registry dialog find light.edit.file.open.enabled key and set it to false (uncheck the box).”

        • Avatar

          Muhammet says:

          May 7, 2020

          Found it! Here it is:

          1. Press Ctrl + Alt + Shift + /
          2. A popup menu will appear, click “Registry”
          3. You will see a long list of key-value pairs. Find “light.edit.file.open.enabled” and deselect it (it is selected by default).

          That is it. Now, when you open a file, it will open in the full PyCharm where you can also run your file, not the poor LightEdit! 🙂


  17. Avatar

    Jamie Echlin says:

    April 22, 2020

    Would be good if it auto-saved on switching frame like regular idea.

    I expected this behaviour, and accidentally ran a shell script that didn’t have my edits because it hadn’t auto-saved.

  18. Avatar

    Sayed Mostafa says:

    April 22, 2020

    Bad option!
    How can i disable it?

  19. Avatar

    Virelo says:

    April 24, 2020

    I love it but I find it pretty useless. As I always have an IntelliJ running, it’s always going to open into one of the editors.
    What I would have loved is a real standalone process (regardless if IntelliJ is open or not). Something maybe executed from another command like “ideal” (l for light) or whatever.

  20. Avatar

    Atsushi Sakai says:

    April 25, 2020

    Great function!!. Thank you.
    If the LightEdit mode supports some plugins like ideavim, it would be great for many users.
    (Maybe, I can finally uninstall vim after that…)

  21. Avatar

    Slavko Stojadinvoci says:

    April 29, 2020

    This is totali stupid, i need to fast open some file like ~/.bashrc and i need to open in same intellij windows. When you work on Mac OS you use Full Screen, when i open new file it open i different windows i must to swich windows. Please back on preview option, or give us option to disable this “amazing feature”. If I need lightedit i open VS Code. 🙁

  22. Avatar

    Andrew says:

    April 29, 2020

    What’s the point of this when we have existing lightweight code editors: Vim, Emacs, Notepad++, Gedit, jEdit, Sublime Text, VS Code and so on?

  23. Avatar

    Andrey says:

    May 3, 2020

    It definetely needs diff tool enabled

  24. Avatar

    Aleksei Lesnov says:

    May 11, 2020

    1. The Shift-Shift menu, and the key combinations like Next tab, Previous tab are unavailable (and the access to the settings, too – those things are probably related). So, some key features are not yet available.
    2. How to open IDEA right in the Light Edit mode? Without opening an existing file?
    3. I opened a couple of files that belong to a Git repository, but haven’t seen either a branch icon or any other indication of Git support (e.g. context menu items).

    Anyway, good luck with the development of this feature!

Discover more