Talk Vim together (11th back: Vim separation), talkvim
Hello, everyone. You are welcome to join in to hear the story of Zhang huiti: Vim. The last time we talked about the removal of the dragon knife: Vim
Life knife method. In this case, let's continue to talk about Vim's knife method: the split knife method of Dragon
vim color, I set the background is black, the font is green, and then set the folder as magenta, the default note for the yellow light; in fact, there is a simple way, is set to the system configuration of the color scheme; reprint article is as follows:----------------
(1) After installing VIM, execute command whereis vim you will see the result:
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
Common Operations in the Vim editor and operations in the vim Editor
Press I to enter the editing mode
Wq! Force save and exit
Q! Do not save, force exit
! Mandatory
Direction key bit:
K
H j l
Ctrl + f move down one page
Ctrl + B move one page up
Starting with a line 0
$ End of a row
The last line of the G File
The first line of the gg File
Dd deletes the row where the cursor is located.
Yy copies the
Everyone crossing, welcome to listen to the large-scale couplet science fiction: Vim. Last time we introduced the VIM plug-in with theThe file is placed. This time, let's continue to talk about Vim's plugin. This time we want to say the vim plugin called: Ctags. Well, that's the same thing.Gossip Hugh, words return to the positive. Let's talk about
Solve the problem of the original URL: http://m.blog.csdn.net/blog/zuisuozhe/37600293, I do the original content to edit, please forgive the original author.
problem : I Ubuntu14.04 under the installation of VIM-GTK encountered the following problems:
$ sudo apt-get install VIM-GTK reading package list ... CompleteAnalyzing Dependency tree for PackageReading status information ... CompleteThere is no avai
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
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.