Launching the Editor

Know how you can launch your source code editor using a terminal.

We'll cover the following...

There are several ways to run the source code editor. The first option is using the GUI of your OS. We can launch the editor via the “Start” menu or the desktop icon. It is the same way we run any other program.

Using CLI

The second option is using the command-line interface (CLI). This approach is more convenient in some cases. Here is an example of when we would need it. We call the find utility for searching several files. We can pass the find output to the source code editor input and open all found files. This is possible because most modern editors support CLI.

There are three ways to run an application in Bash:

  1. By the name of the executable.
  2. By the absolute path.
  3. By the relative path.

The first approach is the most convenient one. However, we need to add the installation path of the application to the PATH variable. Then, Bash can find the program’s executable when we call it.

Let’s suppose that we use Windows with the MSYS2 environment and we have the Notepad++ editor installed. Let’s consider how to run it by the executable name. The program has the following installation path by default:

 ...