In this lab you will experiment with a "power editor" of your choice.
As a system administrator, you will spend a lot of time inside your text editor. Not only is it the primary environment for writing scripts, but you can also use a text editor for editing configuration files, keeping notes, and writing documentation.
Since it is common to access a server system remotely over SSH where you only have terminal access, it is desirable to get familiar with a text editor that works well in a terminal environment. In this lab, you will experiment with such an editor.
Note that for this lab Visual Studio Code is not an option. While it does support remote editing, it is primarily a GUI-based editor. Using it to edit files remote also requires that a large "vscode server" be downloaded onto the remote system. In some applications that might not be acceptable.
Some editors benefit from using terminals with 16 million (24-bit) colors. Most modern terminals do this, but editors that are careful may fall back to less color support if they aren't sure (Helix does this). To work around that, add the line:
export TERM=xterm-256color
to your ~/.bashrc file. If that doesn't work, try adding:
export COLORTERM=truecolor
to your ~/.bashrc file instead.
Choose one of the following editors to explore:
Vim is "Vi Improved." It is an updated version of the original vi editor. It is the classic modal editor on Unix systems. It is extremely powerful but has a steep learning curve.
Vim is pre-installed on your system. If you want to try using a more modern version of Vim, consider installing NeoVim as follows:
$ sudo apt install neovim
Use the nvim command to start NeoVim.
Emacs is the second major power editor on the Unix environment (along with Vim). Also, like Vim, Emacs has a long history and a steep learning curve. However, it is not a modal editor which some people like.
You will need to install Emacs as follows:
$ sudo apt install emacs-nox
The -nox suffix on the package name means to install Emacs without support for the graphical environment (appropriate for use over the terminal). During the installation, you will be asked to configure a mail transport agent. Select "No Configuration." Use the emacs command to start Emacs.
Micro is midway between the simplicity of nano and the complexity of Vim or Emacs. It has many modern features but lacks the extreme flexibility of the more powerful editors. For example, Micro lacks support for the Language Server Protocol (LSP).
You will need to install Micro as follows:
$ sudo apt install micro
Use the micro command to start Micro.
Helix is an example of a modern moded editor. It is not Vim compatible (although it does share some commands with Vim). Instead, Helix reimagines the command set to make it more intuitive and easier to use. Helix is under development, and some advanced features are not yet available. However, it does support LSP servers.
To install Helix, start with the Helix page. There may be a version available in the Ubuntu package repository, but you might get a better experience if you download and manually install the latest version from the Helix Releases page. Installation entails unpacking the archive and moving the hx program into your ~/bin directory. Next, create the directory ~/.config/helix and move the entire runtime directory from the distribution archive to that directory. Use the hx command to start Helix.
After selecting and installing your editor of choice, find out how to do the following things with that editor. Write a document that describes your experience and what you learned.
Note: You will have to do some Internet research to answer these questions. If you use a chatbot (such as ChatGPT or Copilot), check that what it says actually works. Also note that not all editors may support all of these features. If the editor you are investigating does not support a feature, it is okay to say so. The purpose of this lab is to let you explore and to encourage your curiosity about these powerful tools later.
You may want to play with a couple of large text files to see the editors in action. I suggest using RFC-9110 and RFC-9112 for that purpose.
How to open a file.
How to page up and down through the file.
How to jump to a specific line in the file.
How to search a file for specific text. How to search and replace. Are regular expression searches supported?
Can the editor show you split views (multiple views into the same file, or multiple files side-by-side)?
Is there a way to process text in the editor through external filter programs? For example, can you pipe the contents of the editor through programs like cut, sort, tr, or similar without leaving the editor? Try converting all the text in a file to lowercase using tr in the editor (for purposes of this question, ignore any builtin editor command that does this). Can the editor pipe only the text in a block through an external program?
Can you run external commands (such as ls while in the editor and view its output?
Is the editor extensible (or scriptable)? How does that look?
Are third-party packages available for the editor?
For this lab, submit the document you prepared in Part 2. The lab is worth 20 points.
Last Revised: 2025-10-03
© Copyright 2025 by Peter Chapin <peter.chapin@vermontstate.edu>