CLion 2023.3 Help

Create empty files

In addition to template-based files, you can also create empty files without any pre-filled content.

Create an empty file

  1. In the Project tool window, right-click the directory within which you want to add a new empty file. Select New | File:

    Creating a new empty file
  2. In the New File dialog, specify the file name.

    You can precede the name with the required directory structure. If some of the nested directories do not exist, they will be created.

    Creating a new file with nested directories
  3. A new file with the specified structure will be created under the chosen directory:

    New empty file inside nested directories

Assign a keyboard shortcut for creating empty files

  1. Go to Settings | Keymap.

  2. Navigate to Main Menu | File | File Open Actions | New.

  3. Right-click it and select Add keyboard shortcut:

    Assigning a keyboard shortcut for New Empty File
  4. Press the shortcut on your keyboard, then click Ok to save it.

    Assigning a keyboard shortcut for New Empty File

    Use this shortcut to quickly create new empty files.

    The shortcut will also appear next to the New | File action in the context menu of the Project tree:

    A shortcut assigned to New | File
Last modified: 15 March 2024