IntelliJ IDEA 2023.3 Help

LightEdit mode

When you need to edit just one file without creating or loading the whole project in IntelliJ IDEA, you can use the LightEdit mode.

Keep in mind that the LightEdit mode works as a text-like editor, and it doesn't support the usual IDE editor features such as code completion, or code navigation. However, you can navigate to a specific line of code (Ctrl+G), fold or unfold parts of code, check, and change file encoding.

LightEdit mode

Open a file in the LightEdit mode

You can use several ways to open a file in the LightEdit mode.

Open a file from the command line

  • Depending on your OS, open the file from the command line:

    idea.bat -e myfile.txt

    You can find the executable for running IntelliJ IDEA in the installation directory under bin. To use this executable as the command-line launcher, add it to your system PATH as described in Command-line interface.

    idea -e myfile.txt

    By default, IntelliJ IDEA does not provide a command-line launcher. For more information about creating a launcher script for IntelliJ IDEA, refer to Command-line interface.

    Command line
    idea.sh -e myfile.txt

    You can find the script for running IntelliJ IDEA in the installation directory under bin. To use this script as the command-line launcher, add it to your system PATH as described in Command-line interface.

Open a file inside the opened project

You can open a non-project file in the already opened project.

  1. If you don't have the IntelliJ IDEA launcher configured, you need to configure it before you can open a file.

  2. Depending on your OS, open the file adding the -e command before the name of your file.

    For example, for macOS the syntax would look as follows:

    idea -e myfile.txt

Open and edit a file with the wait switch

You can interrupt a process in the command line and put terminal on hold until you're done editing a file in the LightEdit mode. For example, when you work in the command line and run a commit process to Git, you can pause the terminal and use a text editor in the LightEdit mode to quickly write a commit message.

  1. Depending on your OS, open the file adding the -e and -w commands before the name of your file.

    idea.bat -e -w myfile.txt

    You can find the executable for running IntelliJ IDEA in the installation directory under bin. To use this executable as the command-line launcher, add it to your system PATH as described in Command-line interface.

    idea -e -w myfile.txt

    By default, IntelliJ IDEA does not provide a command-line launcher. For more information about creating a launcher script for IntelliJ IDEA, refer to Command-line interface.

    idea.sh -e -w myfile.txt

    You can find the script for running IntelliJ IDEA in the installation directory under bin. To use this script as the command-line launcher, add it to your system PATH as described in Command-line interface.

    IntelliJ IDEA opens the file in the LightEdit mode, and displays a notification indicating that the command line is waiting for the opened file to close.

    the Command line waiting notification
  2. Click one of the notification's options or close the file to release the command line.

Work with code in the LightEdit mode

Even though the LightEdit mode doesn't support all of the IntelliJ IDEA editor coding assistance, you can still use basic editing features and basic menu options.

  • Use the main menu to open recent files, show the line numbers, whitespaces, extend the code selection, and so on.

    When you select File | Open, IntelliJ IDEA opens the Open File or Project dialog where you can quickly navigate to the opened file in the project's root directory. Click the Select opened file icon on the toolbar. Note that for macOS, the native dialog will open.

    Select the opened file

    When you edit a file, the blue color indication on the tab shows that the file content was changed.

    LightEdit mode: changed file
  • When external changes are made to the file you are working on, you can update it by selecting File | Reload from Disk from the main menu.

  • Use the context menu for pasting or folding your code as well as switching to column selection mode.

    LightEditor the context menu
  • Use the status bar to go to the line you need, check the VCS, or toggle the Autosave mode.

Turn on autosave

  • Click Autosave: off on the Status bar and select the Save changes automatically in the popup that opens.

Exit the LightEdit mode

You can quit the LightEdit mode and switch from editing a single file to working on the entire project. To do so, use one of the following ways:

Status bar

On the status bar of the LightEdit mode, click Access full IDE and from the list of options, select how you want to proceed such as open the current file in the project, open the recent project, or open the new one.

Access full IDE
Find action window

Press Alt+Enter and select Open file in project.

Main menu

Select File | Open File in Project from the main menu.

Last modified: 19 March 2024