Patricia Sauer - Authentic Programming

Navigating within text blocks in vi

an opened dictionary with most lines blurred but the word "focus" being sharp

It's nice to know how to navigate within a line or word by word in vi and vim. However, it's still not the fastest way to navigate within vi and vim. It still might take a while to navigate to the desired line. Therefore, we want to have a look at how to navigate within text blocks (sentences and paragraphs) in this article. Additionally, we will get to know the "go to" command to quickly navigate to a specific line as well as to the beginning or end of the file.

Display line numbers in vi

A runner starting field with numbered lanes

Per default, vi and vim are not displaying line numbers. You can display line numbers in the currently opened file or display them per default for every file you open, which can make it easier to navigate and reference specific lines of code or text within a file. In this article, you will learn how to display line numbers in vi and vim.

Moving the cursor within a line and between lines in vi

a bridge during sunset

When working with an editor, it makes sense how to navigate within it properly. Moving the cursor by single characters may sound easy at first sight. You might think just using the arrow keys is sufficient and with that you might be right. In theory. Vi enables us to move the cursor by multiple characters, too. But: This is not possible using the arrow keys. In this article, you will learn how to move the cursor character by character and by multiple characters at once.

Moving the cursor word by word in vi

several distributed word cards

We already learned how to navigate character by character in vi. Navigating word by word can be a time-saver compared to moving character by character, and can also help you work more efficiently. In this article, we will have a look at the six commands for moving word by word. Mastering these commands is a great way to take your productivity to the next level.

Moving the cursor by single characters in vi

several people moving on a public open space

When working with an editor, it makes sense how to navigate within it properly. Moving the cursor by single characters may sound easy at first sight. You might think just using the arrow keys is sufficient and with that you might be right. In theory. Vi enables us to move the cursor by multiple characters, too. But: This is not possible using the arrow keys. In this article, you will learn how to move the cursor character by character and by multiple characters at once.

Closing a file in vi

a person standing on a field holding a book

You finally managed to open vi, viewed or changed your file but how can you exit it now?! Well, it depends on whether you just want to close vi or whether you want to save or discard your changes. In this article, you will learn how to close vi in different ways.

About the modi in vi

a light switch

Working with vi can be pretty confusing at first. You finally managed to open a file, start typing but your text does not appear on the screen. Strange. You probably did not enter insert mode yet. In this article, you will learn about the different modi in vi and how to switch between them.

Killing a process in one line

A hacker in a hoodie

Don't we all know the situation: We start a service and the command line says 'Address already in use'. Let's learn how to kill a process blocking a specific port in just one line.

How to open a file using vi

a blurry editor

Sometimes you have to work on the command line and don't have a text editor with a UI available. The text editors which are available on the command line most of the time are vi and nano. So, you better are prepared to be able to use one of them in case that you don't have the possibility to use your favourite text editor. In this article, you will learn how to open a file using vi.

Next Page
© 2018 - 2023 Patricia Sauer