WebStorm 2024.3 Help

LightEdit mode

When you need to edit one file without creating or loading the whole project in WebStorm, 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), fold or unfold parts of code, check, change file encoding, and reformat your code.

LightEdit mode

Open a file in LightEdit

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

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:

    webstorm.bat -e README.md

    You can find the executable for running WebStorm 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.

    webstorm -e README.md

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

    webstorm.sh -e README.md

    You can find the script for running WebStorm 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 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.

    webstorm.bat -e --wait README.md

    You can find the executable for running WebStorm 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.

    webstorm -e --wait README.md

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

    webstorm.sh -e --wait README.md

    You can find the script for running WebStorm 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.

    WebStorm 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

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.

    webstorm.bat -e

    You can find the executable for running WebStorm 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.

    webstorm -e

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

    webstorm.sh -e

    You can find the script for running WebStorm 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.

Work with code in LightEdit

Even though the LightEdit mode does not support all the WebStorm 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
  • 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 mode.

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

    LightEditor the context menu

Turn on autosave

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

    LightEdit mode: turn on autosave

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.

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

    Access full IDE
  • Press Alt+Enter and select Open file in project.

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

Last modified: 02 November 2024