In the chapters to come, we will be editing files, so we'll need to choose a file editor. There are a bunch of options, but considering that the fastest way to edit files is of course without leaving the terminal, we recommend vim. vim is an awesome editor. It has a lot of configuration options, a huge community which has produced lots of plugins and beautiful themes. It also features advanced text editing, which makes it ultra configurable, and super fast. So let's proceed sudo apt install vim.
Vim is renowned for its exotic keyboard controls, and a lot of people avoid using it because of this. But once you get the basics, it's super easy to use. Let's start vim with no arguments. This is the default screen. You can see the version on the second line. To start editing text press insert.
This will take us to Insert mode where we can start typing. We can see we are in insert mode at the bottom of the screen. Press insert again to go to replace mode, where we overwrite text. Press ask to exit insert or replace, press yy to copy a line, P to paste line. Delete to cut the line colon W to save what you change them to now, optionally specify filename in our case, vim dot txt, colon q to exit vim. Okay, now let's open the file again and do a small change, then colon w q, right and exit at the same time and colon Q and exclamation mark to exit without saving.
After learning these commands, we can do basic file editing directly from the command line. This is the bare minimum that has anybody needs to know when working with vim and we will use this knowledge in the chapters to come. We will also have an entire section about the theme, where we will go more in depth about being productive in the coolest terminal editor today.