This digest is from the network, the initial author is not clear, so no original link is left. If anyone knows, please tell them.
Vim as one of the best text editors, using vim to write documents, writing code is very pleasant things. Whenever you
I. Common functions of VIMVim is a text editor developed from VI. Code completion, compilation and error jump and other convenient programming features are particularly rich, widely used in programmers, and Emacs parallel to become UNIX-like system
One (regular expression)A regular expression (REGEXP) is a pattern written by a class of special characters and text characters, where some characters (metacharacters) do not represent the literal meaning of a character, but are a function of
Delete command-delete character before deleting the character: x (uppercase X) Delete the character after the cursor: x (lowercase x)-word: DW Deletes the entire word, the cursor should be at the top of the word-delete the cursor before the string:
First, move the cursor1、移动到行尾"$",移动到行首"0"(数字),移动到行首第一个字符处"^"2、移动到段首"{",移动到段尾"}"3、移动到下一个词"w",移动到上一个词"b"4、移动到文档开始"gg",移动到文档结束"G"5、跳到第n行"ngg" 或 "nG" 或 ":n"6、移动光标到屏幕顶端"H",移动到屏幕中间"M",移动到底部"L"7、移动到上次编辑文件的位置 "`"Second, edit the operation1. Insert after
Method One ( the most embarrassing method ):1, display the current line number, in the VI command mode input
: Nu
2, display all line numbers, in the VI command mode input
: Set nu #这是: Shorthand for set number
Ctags-vim code Quick Jump 1, descriptionWhen using Vim for driver writing and maintenance in a Linux environment, it is often necessary to call a function or macro definition of the Linux kernel, and frequent jumps between the driver and the kernel
Directory
1, vim mode of operation
2. Insert command
3. Positioning commands
4. Delete command
5. Copy and Cut commands
6. Replace and Cancel commands
7. Search and search replacement commands
8. Save and Exit
Problem Description:Select the specified character in vim to copy/cut/pasteProblem solving:into vim in visual mode, visual mode enters, there can be three ways:(1) In normal mode, the direct key V can enter the default visual mode, you can use v+j/k/
Compiling Vim from the source is actually isn't that difficult. Here's what's should do:
First, install all the prerequisite libraries, including Git. For a debian-like Linux distribution like Ubuntu, which would be the the following:sudo
(a) What is Vi/vim?Almost all the configuration files in the Linux world exist in plain text, and the VI editor is available on all Linux distribution systems, so it is convenient to easily modify the various configurations of the system with simple
Guide
There is no doubt that Vim is a very powerful text editor. It provides a number of features, which means learning and remembering all of the functions of Vim is virtually impossible. But we can at least continue to learn simple ways to do
Edit the code in vim to copy it to the browser or somewhere else. After the copy with YY to go to another place sticky post found that is not the original copy of the content, very headache ...This is due to the fact that Vim has its own set of
Ext.: http://www.cnblogs.com/lee0oo0/p/3548030.htmlAdvanced some of the editor, will contain the macro function, Vim is certainly not missing, the use of macros in Vim is very convenient:: QX starts recording macro and registers the result in
Vim Editor and file testVim Editor In Linux, use a text file to save the configuration file 1. Several basic modes:Edit mode: Keyboard operations are usually parsed as edit commands:Input mode: Input modeLast-line mode: Vim's built-in command-
Use Vim to edit multiple filesVim file1 file2 file3 ...: Next to view or edit the contents of the latter document: Prev View or edit the contents of a previous document: First to view or edit the contents of a document: Last view or edit the
This week we went on to learn the other features of the Vim editor that we didn't finish last week, first learning to use VIM to edit multiple files, vim files 1 files 2 files 3 .... Then we learned to populate the current file with other files,
Save the file and exitIt's a shame to say it, and I've learned this order recently.??And the following command is equivalent:: Wqis to save the current file and exit.(Translator Note: These two commands are actually not exactly equivalent when the
Vim sublimation Tree Catalog plugin nerdtree installation diagramInadvertently see the lab's friends using the VIM can be displayed on the left tree-shaped table of contents, feel very convenient, this looks like folders have what files at a glance.
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service