VI/Vim is one of the most powerful and popular text editors in the liux system. Learn Vim while reading learning the VI and VIM editor, and write simple notes for future queries.Before
Learning vi and vim editors (5): go beyond the barriers of basic knowledge
This chapter summarizes the previously learned editing commands such as "c", "d", and "y", and learns some new knowledge: other methods for entering vi, use a buffer to store dragged or deleted text a
Mac, vi and VIM is God-like editor, how to delete multiple lines, at the beginning, very confused.The following is an example of editing the host fileFirst, in terminal, enter vim/etc/hosts and press RETURN.Enter the default mode of VIM.Vim has three modes of command mode, edit mode, and default modePress ESC to enter the command mode, you can use the exit, save
From: http://blog.csdn.net/suofiya2008/article/details/5630356
VI and Vim are both editors. The difference is that Vim is more advanced and can be understood as an advanced version of VI. VI is like the event plan in windows, whi
Learn vi and vim editors (3): simple text editing (2)
In the previous article, I will continue to explain some simple text editing commands in the vi editor. This article mainly involves commands such as text deletion, copying, and moving.
Delete text:
As mentioned in the previous article, the DELETE command ("d") also
[[email protected] ~]# Touch pmfiles Create this file[email protected] ~]# cat pmfiles> ABC> 123> 321> NBA> CBA> WBA> TBH> EOF[[email protected] ~]# cat Pmfiles ViewAbc123321NbaCbaWBATBHThis article is from "How long, how long to learn." "Blog, be sure to keep this provenance http://tonytu.blog.51cto.com/3696621/1677723Create files and write content directly in the terminal, without the VI, vim and other
files: vim Find initialization files in a specific order, It executes the first set of instructions found (possibly in the form of an environment variable or file) and then begins editing. So the first item that Vim encounters in the following list is the only item that is executed in the list. The order is as follows:
1,VIMINIT: Environment variable, if the variable is not empty,
Vim by default is to edit all files in one window, and only one buffer is displayed when moving between files or moving to different parts of a file. However, Vim also provides multi-window editing to simplify composite editing tasks. This article will learn how to use multiple windows in a running vim process, including initialization and startup of multi-window
editor (vi means visualization of--visual). So, what is a visual editor? Visual editors can see them when editing text. Examples of non-visual editors can be cited, such as Ed, SED, and Edlin (which is the last editor that comes with Dos). VI became a part of the BSD Unix, and later at T also began to use
Vim refers to the "VI improved", that is, the improved version of VI. Currently, Vim is probably the most widely used type of VI.Overview:Author and Brief History:Vim is written by Bram Moolenaar, and is also developed by other people. So vim can grow and change with the com
Tags: file management command run Inux hang ima enter ext edit LinuxVI and Vim Editor and its shortcut keys1. The difference between VI and VIMThey are multi-mode editor, the difference is that Vim is the upgrade version of VI, it is not only compatible with all VI directive
an invisible bookmark somewhere in the text, and then, when you edit elsewhere, you can return to the corresponding bookmark location based on the relevant command. Note that the markup is valid only in the current edit session and is not stored in the file.
MX: marks the current position as x (x can be any character);
' x: (single quotation marks) moves the cursor to the first character of the line where the marker x is located;
' X: (anti-quote) moves the cursor to the chara
Overview:In this article, we mainly study two powerful text editors to understand the characteristics of the two text editors.A, VI (VIM) text editorExercises and after-school assignments1. Delete all whitespace characters from the beginning of lines in the/etc/grub2.conf file that begin with whitespaceSed "s/^[[:space:]]\+//"/etc/grub2.cfgSed-r "s/^[[:space:]]+/
-line mode common commands:: W Save current file: Q Exits the current file:! Force exit of the current file: LS lists all open files: n switches to the latter file: N switches to the previous file: 15 cursor quickly navigates to 15 rows/xxx the first occurrence of the XXX string from the cursor position to search backwards? XXX starts searching forward from the cursor position the first time a XXX string appearsCommand mode common commands:H Cursor Shift LeftJ Cursor Move DownK Move Cursor upL M
, and when you enter "4j", the VI editor displays the following:Then enter the sort command. It can be found that filter text with VI in fact, or through the ex to filter the text (vi editor using the bottom editor is the ex Line editor). In addition to using this command, you can also use "!5!sort", where the second exclamation point represents the meaning of th
Is definitely a boutique, strongly not exclusive, Vi/vim keyboard map. VI is first used in Unix system, it is a text editor, almost all Unix-like machines are provided, learning Linux will need to learn vi/vim, familiar with this
using a named buffer. When you use the ": E" command for file switching, the contents of the named buffer are not purged. you can then save the text that you want to move to a named buffer, and then use the ": E" command to switch the contents of the corresponding named buffers into a new file to complete the text movement between the files.Another way to implement text moving between files is through the ex command ": Ya" (drag) and ":p U" (placement). These two commands, combined with the row
first.The file name must be unique in the directory, and can include any 8-bit characters except the slash (/), ASCII nul: Slash left as the directory separator, ASCII nul all parts are 0. You can even include spaces in the file name as long as you precede it with a backslash (\). It usually contains any uppercase or lowercase letters, plus dots and underscores.Open a file under another directory to specify the full pathname, such as: $ vi/home/john/
";: ~: Similar to the: command, but the pattern used to search is the previous regular expression, rather than the regular expression used in the previous replace command.In addition to using the/character as a delimiter in the Replace command, you can also use any non-alphabetic, non-numeric, non-whitespace character, except backslashes, double quotes, and vertical bars, which are useful when replacing a path string.This chapter VI command summarizes
, you can quickly move the cursor to a label. first create the appropriate tags file for the program source file using the "ctags" command on the UNIX command line, and then use the ": Tag name" command in the VI editor to move the cursor to the line where the name function is located.in command mode, you can move the cursor to the identifier you want to find, and then enter "ctrl+[", or the cursor to the line where the identifier is located. It is im
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.