Xin Xing is playing with you to learn about the operation text in vim section 4. Xin Xing vim
It is worth mentioning that the pdf version of my vim tutorial has been completed. You can download it. Here is the download of csdn: csdn. If the download fails on the left, you can also enter the following address in the browser to download: http://download.csdn.net/de
Download vim and vimVim
Vim-related knowledge is accumulated and is continuously updated.Common Key Mode
n1,n2s/word1/word2/gSearch for word1 between line n1 and line n2 and replace it with word2.
1,$s/word1/word2/gSearch for word1 from the first row to the last row and replace it with word2.
N[Enter]Move n rows down
0: Move to the last character of the row
$: Move to the first character of the row
G
Summary of Vim quick operations in Linux and vim quick operationsHow to move the cursorH. move the cursor to the left by using the left arrow key.J or the down arrow (←) move the cursor down a characterK or the up arrow (←) move the cursor up a characterL or right arrow (→) move the cursor one character to the right[Ctrl] + [f] the screen moves one Page Down, which is equivalent to a [Page Down] button (com
Use the Python and vim plug-ins to allow Vim to support multi-Folder comparison,
On Vim's official website, there is a plug-in DirDiff that supports 2 folder comparisons. Link: http://www.vim.org/scripts/script.php? Script_id = 102. However, only two folders are supported. I aligned the research and improved IT TO MAKE IT support comparison of files in Multiple folders.
The basic principle of the DirDiff pl
I. Introduction of VIMVim is an upgraded version of VI (Vim config file in/ETC/VIMRC)Vim is a color-displayYum Install-y vim-enhancedGeneral mode, edit mode, command modeSecond, Vim color display and move the cursorVim View/etc/passwd filevim/etc/passwdpasswd File Contents:Three, the general mode of moving the cursorCu
Install and configure the vim plug-in ctags and the vim plug-in ctags
Recently I used the ctags plug-in. I found that many of the information on the Internet is not clear enough. I have been exploring Multiple blogs. Today, I have finally configured it successfully and recorded it here for future reference.Plugin introduction:
Ctags is a plug-in vim. It enables u
Copy the vim content to the clipboard and copy it to vimluo Weifeng 2011-7-16
About Vim clipboardArticleThe lecture is in place. Http://hi.baidu.com/abobo1986/blog/item/6c0c766e7dd9bedc81cb4a9a.html
Here, I will provide the operation process to help new users.
1. ESC enters command mode
2. V enters the block operation mode.
3. move the cursor and selectCodeBlock
4. input the "+ Y" character. Your co
Vim simultaneously punched in multiple files, and vim punched in multiple files
Open multiple files:1. When vim is not started:EnterVim file1 file2... filen can open all the files you want to open2. vim has been started.Input: Open fileYou can open another file, and the file content is displayed in vim.Multiple files
1. Location of configuration files under Directory/etc/vim, there is a file named VIMRC, which is a public vim configuration file in the system and is valid for all users. In each user's home directory, you can create a private configuration file, named: ". VIMRC". For example, under the/root directory, a. vimrc file is usually already present.2. Set syntax highlighting1) Open VIMRC and add the following st
Only some of the VIM operations that you use most often are recorded. Keep up to dateText manipulation
D cut. Double-click to cut a row
Y copy, double-click to copy a row
P Paste
x Delete the character below the current cursor
R replaces the current cursor character. Replace the character in the back
: s/old/new/g global replace old to new
Move
0 move to the beginning
$ move to end
W moves to the begi
This method solves my Windows Gvim Chinese garbled problem (share with you),This method references http://www.douban.com/note/145491549/To view the encoding of a file:: Echo fileencodingVim has four options related to character encoding, encoding, fileencoding, Fileencodings, termencoding (the possible values for these options can be found in the VIM online assistance: Help Encoding-names), They have the following meanings:Encoding:vim the character e
Install vim on centos7 and display Chinese Characters in vim
1. Install vim on centos7
Yum-y install vim (simple and crude installation method)
2. No garbled characters are displayed in vim.
(1), vim ~ /. Vimrc (~ /. Vimrc is
Linux learning notes-Explanation of Vim operation commands and learning notes-vim
Linux Study Notes-Vim operations
1. Vim Introduction
Vim is a powerful full-screen text editor,
Is the most common text editor on Linux/UNIX,
It is used to create, edit, and display text files.
one case is to open multiple files in the shell with Vim, and the other is to open multiple files in the VIM editoropen multiple files at the same timeVim File1 file2Open the file and display the Vim-o file1 in the horizontal window file2Open file and display Vim-o p1.sh vertically p2.shopen a new file in VimThe origin
Global find substitution:%s/stext/rtext/gLike what::%s/text/txt/g is to replace all the text into txt. How does vim collectively indent a piece of code or vice versa?
Very simple, by V into the visual mode, select the code to indent, press > Indent code, a > Insert a tab, of course, to insert 3 tab on the input 3>
The tab width can be set in _VIMRC
Set tabstop=4
Set shiftwidth=4
use VIM bulk annotation
Automatically add comments in vim to add text information and vim commentsTo do well, you must first sharpen your tools. In the development process, a convenient and quick development environment can improve work efficiency. A beautiful interface can make us feel happy. The most important thing is that, we can keep ourselves in a difficult and unpredictable place ~
If you want to automatically generate comm
Vim learning notes, vim1. Double-click the letter d and delete the row where the cursor is located.2. vim + filename open the file and locate the cursor at the beginning of the last lineVim + n filename cursor positioned on line nVim +/xxx filename: locate the first line of string xxx3. vim aa bb cc creates or opens three files at a time: n: N move to the next (t
Complete VIM tips: file name completion and vim tips completion
Well, I 've been reading the "concise Python tutorial" These two days. The author suggested to write the file name and the interpreter of the call in the comments in front of the Code. For example:
Well, of course I can't create a file every time. I need to write a large string of things at the beginning. There must be a simple way to use
Batch comments and uncomments are implemented in vim, and vim uncomments
When debugging code, you can easily comment out or cancel code comments in batches. Many ides use shortcuts to comment out or uncomment selected code blocks in batches, how can this function be completed in Vim?
Method 1 selection mode
Batch comment:
Ctrl + v enter the block selection mode,
Use of the vim editor in linux and the vim editor in linux
Vi or vim editor is an indispensable editor. There are many editors available on windows, such as notepad, notepad ++, and edit,
But in linux, it is basically vi or vim. vim is bigger than vi, and it is an enhanced
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.