In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use the Vi text editor, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Install Vi
If you are running Linux, macOS, or BSD, then you have installed the vi command. If you are on Windows, you can download Vim and gVim.
GVim
On NetBSD, nvi is a common alternative to Vi, while Slackware provides Elvis (and Vim), and the popular Neovim reproduction is designed to help users extend Vim with Lua.
Start Vi
Start Vi or Vim with the vi command in the terminal. If the .vimrc file is not found on your system, Vim starts in Vi compatibility mode (you can also force this mode with the-C option). If you want to use gVim to have a graphical user interface (GUI), you can launch it from the application menu on your desktop.
If you are a new user learning Vi, using a graphical user interface is a good way to provide a buffer between the behavior of a text editor you might expect and the design behavior of Vi. The graphical user interface version has a menu bar, some mouse integration, a toolbar and other features that can help you find the basic features you might take for granted in a typical text editor, but you don't know how to do it in Vi.
How to use Vi
Perhaps the easiest way to learn Vi is to use vimtutor, an interactive tutorial packaged with Vim. To get started with this tutorial, start vimtutor and read the instructions, and try each exercise. As mentioned in the tutorial, learning Vi well is not about remembering what keys do, but about building muscle memory to invoke common actions as you type.
Esc key
The first important thing to learn about Vi is to master the Esc key. Esc is a tool for activating command mode, and you will soon understand that in Vi, press Esc as long as you are not sure. In command mode, any key you press will not be entered into the text document you are working on, but will be interpreted as a command by Vi. For example, to move the cursor to the left, you can press the H key on the keyboard. If you are in insert mode, pressing the H key will enter the letter H, as you would expect. But in command mode, press H to move to the left, L to the right, J to move down, and K to move up.
The separation of command mode and insert mode is in sharp contrast to the way other text editors work, and because of this design, this is probably the most significant difference in Vi. But interestingly, in theory, it's not much different from the way you might already work. After all, when you take your hand off the keyboard and use the mouse to select text, you basically put yourself in command mode. In Vi, instead of taking your hand off the keyboard and moving the mouse, or pressing the function key or Ctrl key, you put the editor into a special mode of operation that reassigns your keys to commands rather than text input.
Extended Vi
Before Vim 8.0, Vi was largely "just" a text editor. It has plug-ins, but installing plug-ins is a manual process that many users never want to do. Fortunately, Vim 8 and above provide support for plug-in management, making it easy to install and load plug-ins.
The plug-in for installing Vim can be done through the vim-plug function. For example, to install the Vi file browser NERDTree:
: PlugInstall NERDTree
You can also update the plugin:
PlugUpdate NERDTree: thank you for reading this article carefully. I hope the article "how to use Vi text Editor" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.