How to Use the Leafpad Text Editor on Your Raspberry Pi - dummies

How to Use the Leafpad Text Editor on Your Raspberry Pi

By Sean McManus, Mike Cook

Among the accessories in the Programs menu of your Raspberry Pi is Leafpad, which is a simple text editor. You can use it for writing and word processing, but it’s not ideal for creating print-ready documents. It’s most useful for editing documents intended to be read by computers, such as web pages and configuration files.

[Credit: Leafpad written by Tarot Osuji with artwork by Lapo Calamandrei]
Credit: Leafpad written by Tarot Osuji with artwork by Lapo Calamandrei

The menus are logically organized, and if you’ve ever used a text editor on another computer, you’ll find your way around in Leafpad easily.

The File menu is used to start new documents and open, save, and print files. There’s also an option to Quit here, although you can just close the Leafpad window.

The Edit menu gives you tools for undoing and redoing your work, cutting, copying, pasting, and deleting, and selecting all your text. Leafpad uses Windows shortcuts too, so you can use Ctrl+C to copy, Ctrl+V to paste, Ctrl+X to cut, and Ctrl+A to select all the text.

The Search menu has options to find a particular word or phrase, jump to a particular line in the document, or replace a chosen word or phrase with an alternative. You can click the box to replace all in one go, or step through them individually.

The search and replace features highlight all the occurrences in yellow, and the one that it’s currently focused on in blue. You can use the Search menu to move forwards or backwards through the list of results.

The Options menu has options to change the font (although the choices available are more limited than you’re probably used to), switch on Word Wrap (which means text goes on to a new line when it reaches the edge of the window), and switch on Line Numbers. The auto indent feature means that any indentation used on one line is automatically applied to the next line when you press Enter.