# LightEdit mode

When you need to edit 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 does not 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` (Windows), `⌘ L` (macOS), `⌘ G` (IntelliJ IDEA Classic (macOS)), `⌘ L` (macOS System Shortcuts), `Ctrl+G` (XWin), `Ctrl+G` (GNOME), `Ctrl+G` (KDE), `Alt+G` (Emacs), `Ctrl+G` (Sublime Text), `⌃ G` (Sublime Text (macOS)), `Ctrl+G` (NetBeans), `Ctrl+G` (Visual Studio), `⌘ G` (Visual Studio (macOS)), `Ctrl+L` (Eclipse), `⌘ L` (Eclipse (macOS))), fold or unfold parts of code, check, change file encoding, and reformat your code.

![LightEdit mode](https://resources.jetbrains.com.cn/help/img/idea/2026.2/light_editor_mode.png)

## Open a file in LightEdit

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

> **Note:**
> If you have a Toolbox installation of IntelliJ IDEA, ensure that you have installed IntelliJ IDEA from the Toolbox 1.9 version. If you have a standalone installation of IntelliJ IDEA, create a command-line launcher (`Tools | Create Command Line Launcher…`) first.

Procedure: Open a file from the command line

* Open the file from the command line using the short `-e` or long `--edit` option before the file name:

Windows:

```CONSOLE
idea.bat -e README.md
```

You can find the executable for running IntelliJ IDEA in the [installation directory](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html) under `bin`. To use this executable as the command-line launcher, add it to your system `PATH` as described in [Command-line interface](working-with-the-ide-features-from-command-line.html).

macOS:

```PLAINTEXT
idea -e README.md
```

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](working-with-the-ide-features-from-command-line.html).

Linux:

```PLAINTEXT
idea.sh -e README.md
```

You can find the script for running IntelliJ IDEA in the [installation directory](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html) under `bin`. To use this script as the command-line launcher, add it to your system `PATH` as described in [Command-line interface](working-with-the-ide-features-from-command-line.html).

> **Tip:**
> You can open files from the command line in full-edit mode. Learn more from [Open files from the command line](opening-files-from-command-line.html).

Procedure: Open and edit a file with the wait switch

You can interrupt a process in the command line and put the terminal on hold until you are done editing a file in the LightEdit mode. For example, when working in the command line and running a Git commit process, you can pause the terminal and use the LightEdit mode to write the commit message.

* Open the file from the command line using the the `-e` (or `--edit`) and `--wait` options before the name of your file.

Windows:

```CONSOLE
idea.bat -e --wait README.md
```

You can find the executable for running IntelliJ IDEA in the [installation directory](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html) under `bin`. To use this executable as the command-line launcher, add it to your system `PATH` as described in [Command-line interface](working-with-the-ide-features-from-command-line.html).

macOS:

```PLAINTEXT
idea -e --wait README.md
```

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](working-with-the-ide-features-from-command-line.html).

Linux:

```PLAINTEXT
idea.sh -e --wait README.md
```

You can find the script for running IntelliJ IDEA in the [installation directory](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html) under `bin`. To use this script as the command-line launcher, add it to your system `PATH` as described in [Command-line interface](working-with-the-ide-features-from-command-line.html).

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

![the Command line waiting notification](https://resources.jetbrains.com.cn/help/img/idea/2026.2/open_wait_mode.png)

Procedure: Open an empty IDE window in LightEdit

You can open an empty IDE window in the LightEdit mode. From there, you can open the files you want to edit using the `File | Open` option in the main menu.

* Depending on your OS, start the IDE by using the `-e` (or `--edit`) option.

Windows:

```CONSOLE
idea.bat -e
```

You can find the executable for running IntelliJ IDEA in the [installation directory](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html) under `bin`. To use this executable as the command-line launcher, add it to your system `PATH` as described in [Command-line interface](working-with-the-ide-features-from-command-line.html).

macOS:

```PLAINTEXT
idea -e
```

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](working-with-the-ide-features-from-command-line.html).

Linux:

```PLAINTEXT
idea.sh -e
```

You can find the script for running IntelliJ IDEA in the [installation directory](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html) under `bin`. To use this script as the command-line launcher, add it to your system `PATH` as described in [Command-line interface](working-with-the-ide-features-from-command-line.html).

## Work with code in LightEdit

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

* Use the main menu to open recent files, show the line numbers, whitespaces, reformat code, extend the code selection, and so on. When you edit a file, the blue color indication on the tab shows that the file content was changed. ![LightEdit mode: changed file](https://resources.jetbrains.com.cn/help/img/idea/2026.2/lightEditMode.png)

* 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 status bar to go to the line you need, check the current branch if the file is under version control, or enable the [Autosave](#ws_lightedit_turn_on_autosave) mode.

* Use the context menu for pasting or folding your code as well as switching to column selection mode. ![LightEditor the context menu](https://resources.jetbrains.com.cn/help/img/idea/2026.2/lightEdit_context_menu.png)

## Turn on autosave

Procedure:

* 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.

If the file is already part of a project, that project will open. If the file is not associated with any project, you will be prompted to select a project in which to open the file. If you select a folder that is not a project, the IDE will create a new project in that folder.

Procedure:

* On the status bar of the LightEdit mode, click Access full IDE and select Open the Current File in Project….

![Access full IDE](https://resources.jetbrains.com.cn/help/img/idea/2026.2/light_edit_access_ide.png)

* Press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Alt+Enter` (NetBeans), `Alt+Enter` (Visual Studio), `⌥ ⏎` (Visual Studio (macOS)), `Ctrl+1` (Eclipse), `⌘ 1` (Eclipse (macOS)) and select Open file in project….

* Select `File | Open File in Project…` from the main menu.

## See also

### Related

[Open files from the command line](opening-files-from-command-line.html).

