Editors

Some editors are more suited for a GUI environment and some are more suited for a command line environment.

Command line

These are all good editors for using on the command line:

Of these, vi/vim as well as emacs are probably the most powerful, though the latter is better in a GUI environment. The easiest editor to use if you are not familiar with any of them is nano.

Nano

HINT: code-along!

  1. Starting “nano”: Type nano FILENAME on the command line and press Enter. FILENAME is whatever you want to call your file.
  2. If FILENAME is a file that already exists, nano will open the file. If it dows not exist, it will be created.
  3. You now get an editor that looks like this:
    nano editor
  4. First thing to notice is that many of the commands are listed at the bottom.
  5. The ^ before the letter-commands means you should press CTRL and then the letter (while keeping CTRL down).
  6. Your prompt is in the editor window itself, and you can just type (or copy and paste) the content you want in your file.
  7. When you want to exit (and possibly save), you press CTRL and then x while holding CTRL down (this is written CTRL-x or ^x). nano will ask you if you want to save the content of the buffer to the file. After that it will exit.

There is a manual for nano here.

GUI

If you are connecting with ThinLinc, you will be presented with a graphical user interface (GUI). (For Tetralith, the server is tetralith.nsc.liu.se). From within Thinlinc you can either open a terminal window/shell or you can choose editors from the menu.

It differs a bit how Thinlinc looks depending on the centre, and it also differs which desktop environment they are running. For instance, NSC’s Tetralith has the Xfce environment while HPC2N’s Kebnekaise has MATE.

Examples to open terminal:

  • HPC2N: “Applications” -> “System Tools” -> “MATE Terminal”
  • NSC: “Applications” -> “System” -> “Xfce Terminal”

To choose editors from the menu:

  • HPC2N: “Applications -> Accessories”.
  • NSC: “Applications” -> Accessories” and “Applications” -> “Development”.

Regardless, this gives several editor options, of which these have a graphical interface:

If you are not familiar with any of these, a good recommendation would be to use Text Editor/gedit.

Text Editor/gedit

  1. Starting “gedit”: From the menu, choose Applications -> Accessories -> Text Editor.
  2. You then get a window that looks similar to this:
    gedit editor
  3. You can open files by clicking “Open” in the top menu.
  4. Clicking the small file icon with a plus (located beside the “Open” button”) will create a new document.
  5. Save by clicking “Save” in the menu.
  6. The menu on the top right (the three horizontal lines) gives you several other options, including “Find” and “Find and Replace”.