
Free Python course ➞ Mini-course for beginners and experienced coders. 4 cool projects in the portfolio, live communication with the speaker. Click here to see what you can learn in this course.
Learn MoreOver the course of 16 lessons, we'll cover everything you need to get started with the Vim editor. You'll master basic commands, explore its functionality, and learn how to effectively use Vim for editing text. These lessons will help you quickly adapt and become a confident user of this powerful tool.
- the history of text editors;
- working in insert mode, command mode, command line mode, visual mode;
- using regular expressions and creating macros;
- plugins, plugin package managers;
- Vim configuration, working with the .vimrc file (in particular, using the author's .vimrc file as an example);
- working with Neovim;
- setting up autocompletion.
Today we will present two video lessons dedicated to the Vim text editor. In the first lesson, we will discuss the importance of Vim for modern developers and also consider the evolution of text editors. In the second lesson, we will study in detail the various working modes in Vim, which will allow you to effectively use this powerful tool in your development.
How the course is structured
We provide video lessons and text transcripts, which allows you to both watch and read the theoretical material.

The course author is a professional in their field, possessing deep knowledge and experience. They create educational content that helps students develop skills and achieve goals. The course developed by the author is focused on the practical application of knowledge and incorporates current teaching methods. Thanks to their unique approach, the course author ensures high-quality material and accessibility for everyone. The learning process is built on interactive tasks and real-life examples, which facilitates better assimilation of the material. Choosing a course from this author guarantees the acquisition of relevant and useful knowledge necessary for successful training and subsequent professional work.
Team lead at Purple Magic, video content producer at Red Magic, co-host of the IT Way Podcast, and author of programming courses. He specializes in Ruby and actively shares his knowledge with the public.
Why modern programmers need Vim
Today we'll talk about how to quit Vim. If you're even slightly familiar with this text editor, you've probably encountered this problem. If you're new to Vim, keep in mind that the user experience in Vim is radically different from other text editors. There are many jokes about how difficult it is to quit Vim, such as "I started Vim and only quit after restarting my computer" or "I started Vim in 2007 and still can't quit." These phrases highlight the difficulty many users experience when trying to close the editor. We'll walk you through the simple steps so you can easily exit Vim and avoid those funny situations.
To exit Vim, start by pressing the Esc key a few times. This will ensure you exit any modes you might be in. Then, enter :q in the command line at the bottom of the screen. Then, press Enter. You've successfully exited Vim.
This was the complete Vim course from Skillbox Media. Thank you for participating! We wish you success in applying the knowledge you've gained.
To log in to Vim, follow a few simple steps. If you're using Linux or macOS, you don't need to install Vim. Simply open a terminal and enter vim. This will launch the editor in the command line, and you can start editing text files.
If you're using Windows, go to the Downloads section on the official website and download the installation file. We're confident you'll be able to double-click an EXE file with ease, as your desire to study this course already speaks volumes about your interest and skills.
Vim remains a relevant tool for programmers, system administrators, and anyone who works with text in the third decade of the 21st century. This powerful text editor offers unique features for improving productivity and speeding up editing processes. Vim is especially useful for those who value efficiency, as its keyboard shortcuts allow you to quickly complete tasks without having to fiddle with the mouse.
In today's programming environment, where time is money, using Vim can significantly reduce the time spent editing code, making it an indispensable tool for professionals. Its flexibility and customizability allow you to tailor your working environment to your individual needs, which is also an important factor for developers.
Furthermore, Vim supports many programming languages and can be integrated with various development tools, making it a versatile solution for working in various environments. With the volume of information and code constantly growing, proficiency in Vim can be a competitive advantage that can contribute to skill development and career advancement.
Vim is often the first choice for working with remote servers, as this text editor is available on most servers. While this is true, in today's world with the widespread adoption of technologies like Docker and Kubernetes, the need to connect to a server via SSH and edit files in Vim is becoming less relevant. There are more efficient ways to manage remote applications and configurations that eliminate the need for direct server access.
Second answer: Vim is an outstanding IDE and development environment. Despite the availability of many modern and functional text editors and IDEs, many developers continue to prefer Vim. What is the reason for this choice?
There are three key reasons that support this statement.
- tactile ten-finger typing;
- unrestricted configuration;
- editing programming.
Let's take a closer look at them.
Most modern IT professionals do not attach importance to the ten-finger touch typing method. In my materials and courses, I prefer not to impose specific skills and tools, leaving the choice up to participants. However, I consider the ten-finger touch typing method important and cannot ignore it. Mastering this method significantly increases typing speed and accuracy, which is critical in the field of information technology. Correct use of the keyboard improves productivity and promotes more efficient task completion.
Touch typing is an essential skill for anyone who spends significant time on a computer. This skill not only improves productivity but also makes various typing-related tasks easier. The ability to type quickly and accurately saves time and allows you to focus on more important aspects of your work. Furthermore, touch typing improves concentration and reduces fatigue, which is especially important in high-pressure environments. Mastering this skill can significantly improve your efficiency and professional performance.
If you haven't yet mastered ten-finger touch typing, it's best to postpone switching to Vim. Without this skill, you will encounter difficulties and discomfort when working with the editor. Mastering touch typing will significantly increase your productivity and make it easier to use Vim, which requires fast typing. Therefore, it is recommended to develop the necessary skills before starting to work with this powerful tool.
Vim offers a unique feature for editing text using ten-finger touch typing, completely eliminating the need for a mouse or touchpad. This editor creates a unique approach to working with text that cannot be replicated in other text editors or IDEs. Using Vim allows every user to develop their skills and achieve a new level of productivity, making text editing more efficient and intuitive. Each specialist is given the chance to find their optimal way of working, making Vim not just a tool, but an entire editing philosophy.
Using Vim on modern keyboards can cause some discomfort. When Vim was designed, the Esc and Ctrl keys were located where the Caps Lock key is now. This can lead to discomfort, since using Vim's default settings requires the user to bend their arm to reach the Ctrl key and then return to the Esc key. We recommend making two adjustments that will help improve the usability of Vim.
- In your operating system settings, replace the Ctrl key with Caps Lock. This is useful not only for Vim, but for all programs you work in, because modern users almost never use Caps Lock. The result is that you have an unused key in a very important and convenient place, while the often-used Ctrl collects dust in the corner, and you have to reach for it every time. By moving Ctrl to Caps Lock, you will immediately feel free. Try it, it's wonderful!
- Instead of Esc, it is better to use the combination Ctrl + [. It seems difficult, but over time you will realize that holding Ctrl + [ instead of Esc, which is very far away, is much easier. There is another option: choose a keyboard on which Esc is closer. However, no matter how much I searched for such options, I did not find any. Maybe you will be lucky.
The main difference between Windows, macOS, and Linux users is the approach to problem solving and interaction with operating systems. With Windows and macOS, if a crash or error occurs, the operating system itself is often held responsible. Users of these platforms expect the system to run smoothly and provide a user-friendly interface for troubleshooting. In contrast, Linux users often face the burden of self-configuration and troubleshooting. If something isn't working properly in Linux, the cause is usually the user's actions or settings. This approach requires greater involvement and knowledge of the system, making Linux more flexible but also more demanding. Vim demonstrates a similar principle. When you first launch it after installation, you're faced with a completely blank editor. The features available in Vim depend entirely on your preferences. Creating your own scripts to simplify working with code is easier in Vim than in more complex integrated development environments (IDEs). This allows users to customize the editor to their needs and improve their productivity.
You can choose your own file system plugins, as well as search and autocompletion plugins. You can manage autocompletion methods and customize them to your needs. Users willing to invest the time to customize and optimize their work environment can fork plugins and create their own versions. These scenarios are common throughout the Vim ecosystem, making it a flexible tool for developers.
Setting up Vim from scratch is a time-consuming process. However, the results you get afterwards will be worth the effort. Not everyone has the time to immediately devote to learning this powerful edition. From personal experience, I can say that in 2011 it took me three weeks to master Vim's basic functions and test various plugins and approaches. This time has proven to be a good investment, as over the course of ten years of working with Vim, I have recouped this investment many times over. Customizing Vim may seem like a daunting task, but the productivity and coding benefits make it worthwhile.
Over the course of this long period, I've periodically tweaked my Vim setup, ultimately spending about four weeks on optimization. Ten years ago, as a student, I could afford three weeks on similar tasks. However, not everyone can invest that much time, so I recommend looking into pre-built Vim builds for various programming languages. You'll likely quickly find yourself adapting them to your needs, which isn't particularly difficult with Vim.
Unrestricted configuration gives professionals the opportunity to develop a new approach to working with source code, adapting it to their needs. One could argue that many integrated development environments (IDEs) and text editors also offer extensive customization options. However, there's an important difference: in large IDEs, customization flexibility is an added feature, while Vim is a blank slate from the start, where flexibility is the core principle. This allows users to fully control their development environment and customize it to suit their individual preferences, significantly increasing their productivity.
Coding editing is the process by which a developer applies their programming skills to simplify the writing of source code. By changing your mindset, you will strive to improve your skills in editing code and text files, which will allow you to work more efficiently. This approach not only optimizes the programming process but also promotes a deeper understanding of the structure and logic of the code, which ultimately improves the quality of the projects created.
Many text editors and integrated development environments (IDEs) include macros—quickly created scripts that significantly simplify the work of programmers. In the Vim editor, using macros is simple and effectively integrated into standard workflows. Macros can save significant time, especially when editing large files containing thousands of lines of code. Their use increases productivity and reduces repetitive tasks, making the development process more efficient.
When using Vim, it's important to be mindful of every action in the text editor. If you encounter difficulties with certain commands, stop and analyze how you can optimize this process. This will help make your work more efficient and increase your productivity. Vim masters are always looking for ways to improve their skills to simplify everyday tasks and reduce the time spent editing text.
Text input methods, the use of commands, or plugins may vary depending on each user's preferences. It's important to remember that if a popular plugin doesn't suit you, this is completely normal. User experience, physiology, and habits are individual, and everyone chooses the tools that suit their needs. There is no universal solution that suits everyone, so it is worth experimenting and finding what works for you.
The methodology of working with Vim is about constantly improving your skills. It's a continuous process of learning and development that becomes an integral part of Vim users' mindsets. By investing time in practice and learning new commands, you significantly increase your productivity and work efficiency. Every interaction with the editor opens up new possibilities, allowing you to deepen your understanding of its functionality and adapt it to your needs.
The freedom to choose your programming language in Vim is a major advantage. While it's worth keeping in mind that language-specific support may be less advanced than in specialized IDEs, Vim does have one significant advantage. You can work with multiple languages in a single environment, simplifying the development process and increasing productivity. This functionality, while not unique, makes Vim a convenient tool for programmers who prefer a general-purpose solution.
The History of Text Editors
A text editor is a program designed to create and edit text documents. In this course, we will examine code-focused text editors, such as Vim and other similar tools. These editors provide essential features for writing, editing, running, and debugging code, making them indispensable for developers. For example, Vim fits this definition perfectly due to its flexibility and powerful customization options.
To deeply understand Vim, it is necessary to consider the history of text editors. Determining which editor was the first is difficult, since at that time there were no platforms for instantly informing about new software products. Therefore, we will focus on the key stages that had a significant impact on the history of text editors.
The TECO (Text Editor and COrrector) text editor was developed by Dan Murphy in 1962. This editor was one of the first tools for editing text on computers, offering users unique features and capabilities. TECO allowed programmers and users to effectively manage text data, which contributed to the development of software and computer technology. With its innovative architecture and functionality, TECO had a significant influence on subsequent editors and became the basis for many modern text editors.
Dan Murphy, while a student at MIT, developed the TECO editor, which served not only as a text editor but also as an interpreter for the TECO programming language. This software was effectively a program development suite, making it unique in its kind. Over time, TECO began to be used as a text editor. It is worth noting that the TECO language did not have a traditional syntax; it relied on macros, providing flexibility and power in editing. The TECO interface looks like this:

Concise and clear. The user is asked to enter macros to work with the editor. The TECO user manual, which is approximately 300 pages long, provides all the information necessary to effectively master the editor.
In this lesson, we mention TECO because the Emacs text editor was developed on its basis. The name Emacs stands for Editor MACros, emphasizing its functionality in working with text. Thus, it can be said that TECO has had a significant influence on the formation of one of the most popular and important modern text editors.
The question of which operating system TECO was developed for is not entirely accurate. At that time, software was created with specific computer models in mind. Over the course of its existence, TECO has been adapted for many different platforms, including its release for the Unix operating system. In addition, there is a group of enthusiasts who have successfully ported TECO to Linux, which testifies to its flexibility and versatility.
The next editor worth discussing is QED (Quick Editor). This line-based text editor was created in 1966 by Butler Lampson and Peter Deutsch and implemented by Peter Deutsch and Dana Angluin. QED was one of the first text editors to have a significant impact on software development. Its simplicity and effectiveness in editing text made it popular among programmers of the time. QED supported a variety of editing commands, simplifying the process of working with text. It allowed users to easily manipulate strings, significantly increasing productivity. QED became the predecessor of many modern text editors, and its legacy lives on in new developments.

In the early seventies Lampson, while working at Xerox, began developing the Xerox Alto computer, the first device with a graphical user interface. In the early 1980s, Steve Jobs and his team adapted the concept of the graphical interface, borrowing ideas from Xerox. This story has become the basis for many films and documentaries. Why is this information important? It illustrates the significance of historical events in the development of technology. In this lesson, we will draw parallels to better understand the influence of the past on the present.
QED is a line editor that allows you to edit text data using various input devices in a terminal. An input device is a keyboard, a file, or any other source of text information. It is important to note that the first version of QED was designed to work exclusively with a teletype, which limited its functionality in its early stages. QED became the basis for many modern text editors due to its ability to effectively process text commands.
The QED line text editor, like TECO, did not have a graphical or pseudo-graphical interface. These editors allow you to edit text directly from the terminal. They offer a set of commands and primitives that are used to edit text input from the device and sent to output. Line-based text editors like QED provide efficient editing, making them convenient tools for developers and system administrators.
The QED editor had a significant influence on the creation of the first standard editor for the UNIX operating system, known as ed. Ken Thompson, the developer of ed, was responsible for porting QED to various computer models. His version of QED was the first to implement support for regular expressions, which became an important tool for text editing in a line editor. Thanks to the introduction of support for regular expressions, ed quickly gained popularity, as it significantly simplified the process of text editing.
The ed text editor was the first stream-oriented text editor, making it unique in its kind. It was mentioned earlier that modern line-based text editors operate on the basis of data streams. Unlike QED, which was limited to working only with devices as data sources, ed was able to effectively use streams for input and output. This innovation opened up new possibilities for text processing, significantly simplifying data management and improving the user experience.
The ed text editor was an effective tool, but its user experience left much to be desired. Early versions of the program lacked status notifications for command execution, making it difficult to understand the success of operations. Users had difficulty tracking the results of their work, which negatively impacted the overall user experience.
In the mid-1970s, Lee McMahon developed a new text editor focused on stream processing, called sed (Stream Editor). This editor combined all the functionality of ed, improving user responsiveness and significantly expanding the internal text editing language. Sed is also considered a programming language, as its set of primitives and idioms makes it Turing-complete. This allows users to create complex text processing scripts, which significantly increases its functionality and attractiveness for developers.

Sed continues to be used by many specialists to solve specific problems. For example, I use it when I need to perform a set of repetitive actions on a large collection of files. Instead of writing a script in Ruby or another familiar programming language, I simply create a Bash script using sed. This significantly simplifies data processing and saves time.
The modern text editor sed has changed significantly from its original version, created over 50 years ago. However, the key principles and methods for working with text embedded in sed remain relevant and can be useful for modern specialists in the fields of programming and data processing. Using sed allows you to effectively manipulate strings, perform search and replace, and process text files, making it an indispensable tool for automating routine tasks and streamlining workflow. It is important to understand how to apply these traditional techniques in a modern environment to get the most out of this powerful editor.
We have come to the study of the history of pseudo-graphical text editors. A pseudographic interface is an interface created using pseudographic symbols that represent graphical primitives such as lines, rectangles, triangles, and crosses. Modern encodings, including Unicode, contain many pseudographic symbols; for example, Unicode has approximately 90 of them. These symbols allow for the creation of visually appealing text interfaces that help users better navigate information. Pseudographic text editors find application in various fields, including programming and text editing, making them an important tool in the world of computer technology.
In 1976, Bill Joy developed a text editor called vi, which is an abbreviation of the word visual. This name emphasized the presence of a graphical interface, which was quite attractive at the time, although by today's standards it could be considered pseudographic. An alternative interpretation of the name vi is related to Visual mode, which was a significant advance in the functionality of editors at that time. If you have the opportunity to chat with Bill Joy, don't miss the chance to learn more about his inspiration and the ideas behind vi.

Pseudo-graphic text editors, such as vi, became the basis for modern text editors. Their development allowed for the creation of functional interfaces; however, the use of pseudo-graphics was resource-intensive. With limited RAM, it was impossible to implement all functions on a single screen. To solve this problem, operating modes were introduced, allowing the user to switch between different editor functionality. This made it possible to effectively use keyboard shortcuts for text editing depending on the selected mode.
Another important aspect that influenced the development of the vi editor is that Bill Joy created it using an ADM-3A terminal. In this terminal, the Esc and Ctrl keys were located where the Tab and Caps Lock keys are found on modern keyboards. This key arrangement led to the Ctrl and Esc keys becoming crucial to user experience in the vi and Vim editors.
The Wikipedia entry for vi mentions that the text editor was popular among hackers and programmers before the advent of Emacs. The entry also includes a comment by Bill Joy, who noted that Emacs has a modular architecture, something he hadn't considered when creating vi. Thus, Emacs advocates have found their place on Wikipedia, highlighting the importance of the editor in programming history.
The next stage in the evolution of the vi editor was Vim (Vi Improved), developed by Bram Molenaar. Vim was first released in 1991. This text editor is licensed under the Vim license, which allows free use for any purpose, and also offers users the opportunity to make voluntary donations to a fund to support children in Uganda. This message about helping children is displayed immediately after Vim starts, emphasizing the developers' social responsibility. Vim has become popular among programmers due to its extensibility, customizability, and powerful features, making it one of the best tools for working with text and code.

In its early days, Vim had several key differences from vi. First, Vim offered more advanced editing capabilities, including support for multiple windows and the ability to work with multiple buffers. Second, it introduced powerful tools for finding and replacing text, which greatly simplified the editing process. Vim also provided support for creating macros, allowing users to automate repetitive tasks. Additionally, Vim's interface became more customizable, providing a convenient experience for different users. These differences made Vim a more functional and convenient tool for programmers and text editors, which contributed to its popularity in the development world.
- Syntax highlighting. vi supported only one color of text output. Vim, on the other hand, allowed you to use all the colors available in the terminal.
- Multiple undo. While in vi you could only undo the last operation, Vim keeps a long history of actions available for undo.
- Vim had an interface for creating plugins. I'm not sure when exactly it appeared, but the very fact that such an interface existed allowed Vim to evolve and become a full-fledged IDE for development.
Check out additional materials:
- Turning Vim into a full-fledged IDE for Python
- Test: Can you distinguish the Zen of Python from the philosophy of Lao Tzu?
- The Go language: what's under the hood and why a programmer should learn it as a second language

