A more comprehensive introduction of vim (for example)
Http://www.cnblogs.com/dubing/archive/2011/12/16/2290421.html
Http://blog.csdn.net/sabalol/article/details/3426635
Http://hi.baidu.com/howard1980/blog/item/3399e42668751b0a908f9d5f.html
Previous review
The previous section describes the basic environment configuration of C Programming in linux and the selection of related tools.
But we can use vim for
1. Command operation scope
In fact, many Vim commands are only edited within a text range. A text range can be one character, one word, one line, or another specified character range. You can use the vim command and the text range control key to better complete the editing task. The command format is as follows:
Command + Operation Range
The command can be:
D: delete command. Delete the text of the spe
Vim shortcut keys and vim common shortcut keys
# Vim filename
: Scriptname// View scripts loaded by vim
: Set nu// Set the row number
: Set tabstop = 4// Set a tab to 4 spaces
: Set ai// Set Automatic indent
Space key// Move one cell to the right
X// Delete the subsequent characters (in command mode)
X// Delete the fir
Vim Advanced Skills-use vim to compare two files: 1: Use vim-d file1 file2 to directly open two files or: Use vim file1 to open the first file, use vert diffsplit file2 to open the second file for comparison. (vert indicates the Vertical Split Window, which is the horizontal split window by default.) 2: directly compar
The following prompt appears during installation:There are no packages available for Vim now, but it is referenced by other packages.This may mean that the missing package may have been discarded,Or can only be found in other publishing sourcesE: Package vim is not available for installation candidateWorkaround:First step: sudo apt-get updateStep two: sudo apt-get install vimubuntu12.04 when installing
Tags: 309653Enter edit modeEdit mode, which is the mode that we can modify the document, configureI insert in the current word match eitherI (uppercase) is inserted at the beginning of the line where the cursor isA inserts after the current characterA (uppercase) is inserted at the end of the line.o Insert another line below the current lineO (uppercase) Inserts an additional line above the current line·····VIM Command modeFind:/Add the characters you
Vim and vim
The following article is translated from "Learn Vim Progressively". I think this is the best VIM Upgrade tutorial for beginners. I did not list all the commands, but just listed the most useful commands. Very good.
---------- The text starts ----------
Do you want to learn
window under the use of VIM to do PHP development environment (although I have been under Ubuntu with VIM) ...
Although Vim is essentially an editor. But with some appropriate plugins, VIM can become a full-featured IDE. I have been using vim for a long time, after repeated
Modify the. vimrc file under your user directory. There is a "." In ubuntu, it indicates a hidden file. Then, put the configuration content in the file. I. find a plug-in: AutoComplPop. Download the latest http://www.vim.org/scripts/script.php for this tool from the URL below? Script_id
Modify the. vimrc file under your user directory. There is a "." In ubuntu, it indicates a hidden file.
Then, put the configuration content in the file.
I. code prompts
Find a plug-in: AutoComplPop. Download the
Sprout new note-vim command "=", "d", and "y" usage (combined with the cursor movement command, it will be very convenient in some cases), vim is very convenient
Vim has many commands. on the Internet, you can search for a bunch of posts and articles to list commands for various functions.
For "=", "d", and "y", I accidentally discovered some of the same usage.
Common Vim shortcut keys and keyboard diagrams, and vim shortcut keys and keyboards
Common Vim shortcut keys
H-move the cursor one character left. j-move the cursor one character down.
K-move the cursor up one character l-move the cursor down one character to 15 rows-15j
Ctrl + f-move one page down on the screen Ctrl + d-move half page down
Ctrl + B-move one pag
Vim auto-complete, vim auto-complete, and so on. In summary, copy and paste the following code ~ /. Vimrc, save, close all vim, and open it. Enter the cursor inside the brackets. Www.2cto.com [plain]: inoremap ()
Vim (multiline comment and delete multiline comment )., Vim multi-line--- All in ESC mode:1. Comments in multiple lines in vim.(1) press Ctrl + v to enter the column mode;(2) select to end at the specified position at the beginning of the line to be commented. (Use the up/down key to determine the number of rows)(3) Press "I" to enter the insert mode;(4). Enter t
Linux applications: Vim quick operations and vim quick operations
1. Delete characters
X: Delete characters under the cursor
Dd: deletes a whole line, including line breaks.
J: Delete the line break of the current row. It can be executed anywhere in the current row.
2. Undo and undo
U: undo the last operation. Continuous execution will be unperformed continuously.
U: undo the row. undo all the last modifi
In the past, all the auto-completion functions of VIM were downloaded from the Internet when needed, and copied to their own vimrc. I didn't know what it meant, the results show that many of the methods found to be auto-complete are quite different. Some prefer to use auto-wrap when the braces are fully filled, and others prefer to use auto-indent when the braces are fully filled, let's take a few minutes to understand how to write these configuration
1. Three modes(1) Command mode:Just start vim and enter command mode, at which point the keystroke will be treated as a command.Here are a few common commands:I switch to insert mode to enter characters.x deletes the character at which the current cursor is located.: Switch to Baseline command mode to enter commands at the bottom of the line.(2) Input modePress I in command mode to enter the input mode.In input mode, you can use the following keys:Cha
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 the exit, do not save the command to exit. Co
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
http://top.jobbole.com/1370/
The Sublime Text Editor has a very powerful "multiple selection" feature that supports "one edit, multiple changes". Since the vim-multiple-cursors this plugin, VIM users no longer need to envy Sublime Text users. After you install the plug-in, select multiple selections by pressing Ctrl + N. After selection, you can combine Vim wi
I. VIM's editing modeSecond, vim command modeThird, VIM practice operation# Cp/etc/dnsmasq.conf/tmp/1.txt (1) Move Down, right, left, and up 6 characters (6j 6l 6h 6k) respectively. (2) turn down and up two pages (two times ctrl+f and Ctrl+b respectively). The (3) Moves the cursor to line 49th (49G). (4) Move the cursor to the end of the line, and then move to the beginning (Shift+4, shift+6). (5) moves
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.