The Vim CLI Text-Editor
Shell·4 min read·Jan 1, 2025
A text editor is a program that allows you to write and edit plain text files, which exclusively consist of character representation and contain no other information than the text itself.
A word processor, on the other hand, is a program that allows you to write and edit rich text files, which contain characters, but also metadata, character and paragraph formatting data (e.g. font size, color, alignment), and page specification data.
Unlike rich text files, plain text files are mainly used by developers for writing code, scripts, programs, and configuration files.
Text editors can either be standalone visual programs such as VSCode, or command line programs accessible through the shell such as Vim.
Note that since Vim is a complex editor with hundreds of available shortcuts and commands, this lesson will only cover the most common ones that you are likely to use on a regular basis.
Installing Vim
To check whether Vim is already installed on your system, you can output its version number using the vim command:
$ vim --versionInstalling Vim on Linux
To install Vim on Linux, you need to first update the package information from all the configured sources using the apt update command:
$ sudo apt updateThen use the apt install command:
$ sudo apt install vimInstalling Vim on macOS
To install Vim on macOS, you can use the brew install command:
$ brew install vimUnlock the CLI & Scripting with Bash module
Learn how to gain advanced control over the OS and automate complex routine tasks prone to manual errors with the CLI and Bash scripting.
You get immediate access to:
- 34 focused lessons across the CLI and Bash
- 4 real-world projects with commented solutions
- Ongoing updates to this bundle
- Lifetime access to this bundle