Hi, today I'll present you something new. It is an experiment and I'd be curios whether you like it. I've started a little series of ttyrecs. That means, I've recorded a little tip or trick on the console and uploaded it to PLAYterm so it can be easily played back in the browser. I thought it could be useful to do a little command line gymnastics.
Today I'll show you three ways how you can number lines in text files. We'll do that with cat, nl and vim.
Note: you need JavaScript enabled in order to play the ttyrec.
Vi and its successor vim are both very mighty and well known tools. Some love them, some hate them. But overall, they're complex. If you are about to learn vim, it's probably a good idea to have a well arranged cheat sheet or reference card of the most important keyboard commands. It's not very difficult to find one, there are hundreds of thousands of cheat sheets, but many consist of HTML tables and are ugly or confusing. Only a few are really suitable for printing and having them on the desk