Editing text files

Whilst using FSL you are likely to need to use a text editor at some point, for example to create a fsl.sh settings file, a ~/.bash_profile or ~/.zprofile shell configuration, or an event EV file.

There are lots of plain text editors available - some suggestions can be found below. Or, you may already be familiar with an advanced editor such as Emacs, VS Code, or Atom.

nano

One of the simplest options is a terminal-based program called nano. This is installed on nearly all macOS / Linux computers, and is old-fashioned, but easy to use. Simply type nano <file_to_edit> into a terminal.

macOS

macOS comes with an editor TextEdit (look in /Applications), by default it create Rich Text documents which FSL cannot use, so you need to change the settings so that it will create Plain Text files. Do this by opening the preferences window (TextEdit > Preferences) and in the New Document tab choose Plain Text from the Format section. Then in the Open and Save tab deselect Add ".txt" extension to plain text files. You can now close this window and open a new file with File > New`.

Other options include the editors mentioned in the Linux section below, although you may have to download and install the editor.

Linux

The Gnome desktop ships with an editor called Gedit which is straightforward to use (there is a Mac OS X version available). To start it type gedit, or gedit <file_to_edit> into a terminal.

Windows

If you have installed FSL on Windows, using the Windows Subsystem for Linux, you can use nano or gedit to edit plain text files (although you may need to install gedit first).

The Windows Notepad program is also a good choice for editing plain-text files on Windows.

 

TextEditors (last edited 13:07:47 05-03-2021 by PaulMcCarthy)