number up-key to delete the specified number of rows
YW copy the word of the cursor
YL Copy the letter of the light
YY Copy an entire line
P Paste
Y number y-copy number of lines specified
CW cut words in the cursor
The letter where the CL cuts the light
CC Cut one whole line
C digit C cut number specified number of lines
Note: When the cut is finished, it will enter insert mode, and then press the P key to exit insert mode before pasting.
: line number move cursor to specified line
G move curs
Linux learning notes (10) Text Editor vim, learning notes vim
Vim is a powerful full-screen text editor, the most common text editor for Linux/Unix. It is used to create, edit, and display text files.
: first to switch to file oneExit QA All Exit17, split screen display a fileCtrl+w,s Horizontal split screen: SplitCrtl+w,v Vertical split screen: vsplitToggle the cursor between windowsCtrl+w,arrow18, sub-Windows multiple filesVim-o Horizontal split Screen displayVim-o Vertical split Screen display19. Save some of the contents of the current file as a different fileUse the W command in the last row modeSave within specified ·Addr1,addr2w/path/to/somewhere20. Populate the contents of another fil
following n rowsP/p pasted at the current cursor row or lineTo replace or cancel a command:R replaces the character at which the cursor is locatedR replaces the character at the beginning of the cursor and presses ESC to endU Cancel the previous actionSearch and search Replacement commands:/string search for specified string, ignoring case when searching: Set ICn searches for the next occurrence of the specified string:%s/old/new/g full text Replace specified string: N1,n2s/old/new/g replaces s
character at which the cursor is located.
In normal mode, y$ copy to end of line. The character where the light is contained.
In normal mode, yw copy a word.
In normal mode, y2w copy two words.
In normal mode, yG copy to the end of the text.
In normal mode, y1G copy to the beginning of the text.
Use paste in normal mode p
In normal mode, p (lowercase) represents pasting to the cursor (bottom)
In normal mode, P (uppercase) means pasting t
Use of the Vim editor in Linux and the linuxvim Editor
NAMEVim-Vi IMproved, a programmers text editor # vi improvement, a program text editor1. How to move the cursor
Ctrl + f
Move one page down
0 (number 0)
Move to the beginning of a row
$
Move to end of line
, but the main purpose of this course is to let you learn in the experimental building other need to use vim of the course without any problems. If you want to simply learn and master the Vim editor, through a variety of tutorials including the course of learning is not able
Want to learn the best text editor vim in human history at the fastest speed? First you have to know how to survive in Vim, and then learn all kinds of tricks at 1.1 o '-point.
Vim The Six billion Dollar
. Get VIM:If the operating system is a unix-like operating system, VIM may already be installed. If your operating system does not have VIM installed, you will need to manually install vim yourself. get vim in Unix and gnu/linux environments:A certain version of Vim is now a
I. Introduction of VIM ModeThe following introductory content is from the Wikipedia vimThere are many modes of vim from VI, this unique design is easy to confuse the beginner. Almost all editors have two modes of inserting and executing commands, and most editors use a different approach to vim: the command directory (mouse or keyboard driver), the combination of
q:quitw:writeq! : Forced exit
Useful function o: Insert one row below the current line O: The previous line of the current cursor inserts a line home: Beginning end: Line end I: Into insert mode ESC: Back to command mode command-line mode: G for the end of the file, G to jump to the first line of file 100G: Skip to line 100th: 150 return Jump straight to line 150/xxx: Find xxxn: Look down N: Look up the full screen color word, feel free to tap a few words on it. Search Replace:%s/ssl/sss/g
The important task of a system administrator is to modify and set up configuration files for some important software, so at least you have to learn more than one command-line interface for this article editor.At the end of this article, we will look at the knowledge of the text editor under the Linux system and how the program editor
combinations and commands need to be remembered, and are now considered to be expert, geek-only editors. Although Vim is already an antique-grade software, there are countless newcomers to the difficulty of learning to use, it can be seen in the classic and popular degree. In addition, because Vim is very configurable, a variety of plug-ins, syntax highlighting color scheme, and so many, whether as a code
by the original encoding format
-T
To, that is, the new code in the back, what format
-O File
Keep the original file, using the-o new file name, you can create a new encoding file.
If you want to convert traditional Chinese utf8 to UTF8 encoding in Simplified Chinese, you can do this:Bash code
# iconv-f utf8-t Big5 Vi.utf8 |\ > Iconv-f big5-t gb2312 | Iconv-f gb2312-t Utf8-o Vi.gb.utf8
22. Common text
recommending it is that vim is a bit difficult for beginners. But today still wrote this article recommend to everyone. Two reasons: One, the editor of the adult selected the topic, to the public to preach vim and Emacs, this courage inspired me. Second, has issued two masters of the article (Wang Yin's "emacs" is a kind of faith! The world's strongest
Some people complain that the Linux system does not resemble VC and other convenient and quick editor, someone with Gedit, some use vim, but are not convenient and there is no automatic completion of the user-friendly functions such as the user. This article briefly introduces the use of several plug-ins in Vim (Ctags, Cscope and TagList) to implement a powerful
software, VIM is far better than ultraedit. The only reason not recommended is that Vim is a little difficult for beginners.
But today I wrote this article to recommend it to you. There are two reasons: first, the editors have chosen a question and want to preach vim and Emacs to the public. This courage inspired me. Second, I have published an article by two ma
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.