VIM tutorial, vim
Vim environment setting parameters
: Set nu
: Set nonu is to set and cancel the row number!
: Set hlsearch
: Set nohlsearch hlsearch is high light search ). This is to set whether to reverse the white value of the searched string. The default value is hlsearch.
: Set autoindent
: Is set noautoindent automatically scaled down? Autoindent m
The above is, all can be listed in my resources, and the instructions for use are attached below:
Usage:1. Put. vimrc in the vimrc package in the/home or/root directory (depending on your identity ).2. Put the files in plugin and Doc in the other two zip packages into Vim/DOC and VIM/plugin respectively.The specific contents depend on your system and VIM v
For a whole bunch of vim files online, here's just a few steps to record my new configuration environment. for viewing reference.Installation Configuration VundleThe first step is to create a vim directory and configuration file:Under the ~ directory, add the. vimrc file and the. Vim/bundle/vundle directory.The second step is to add the configuration contents of
Source: ChinaUnix blog Date: 2008.07.30 (1 comment in total) I want to comment
Software requiredVimHttp://www.vim.orgCode_complete.vim plug-inHttp://www.vim.org/scripts/script.php? Script_id = 1, 1764Ctags are usually available after vim is installed. It is not supported in ubuntu and needs to be downloaded.1. vim ConfigurationReprinted Eric's article, source of the original articleHttp:/
Basic operations in vim mode and basic operations in vim ModeAuthor: fengxueting Source: http://www.cnblogs.com/fengxueting-px/
Preface
Although Emacs can complete most editing operations, vim is sometimes used for convenience. Therefore, a simple vim operation is recorded. You only need to get started.
This document b
Original article: http://hi.baidu.com/flost_li/blog/item/acbccd2355952d47935807d0.html
Usage:
1: Use vim-D file1 file2 to directly open two files for comparisonOr: Use Vim file1 to open the first file, and then use vert diffsplit file2 to open the second file for comparison;(VERT indicates the Vertical Split Window, which is a horizontal split window by default)2: directly compare the differences between t
Vim editor operations and Vim editor operations
1. vi Operation Mode
Vi provides two operation modes: insert mode and command mode ). In input mode, you can enter text. In command mode, you can perform various editing actions, such as deletion and modification.
In input mode, Press Esc to switch to command mode.
In command mode, press the input command (I, a, o, etc.) to enter the input mode.
2. Access vi
Basic Linux vim operations and basic Linux vim operations
1. display the number of rows
Input
: Set number or: set nu
2. move the cursor
H. move the cursor to the left.
J move the cursor downward
K move the cursor up
L move the cursor to the right
N
0 or move the home Key to the beginning of the line
$ Or end key move to the end of the row
W moves to the header of the next word
B Move to the first of the
[Vim] vim notes-split screen operation
We often need to open multiple files, operate multiple files in different windows, and split the screen is very useful.
1 command mode: new, create a file and split the screen, shortcut key, Ctrl + W, then immediately press the n key: spilt horizontal split screen, the current screen is divided into two, horizontal. Ctrl + w, s: vsplit Vertical Split screen. The curr
Multi-window open multiple filesVim-o file1 file2 ...----default up/down split windowvim-0n file1 file2 ...----vim defaults to n + windowsSplit window: [v]split file----open files with split (v) or Portrait split current window (equal to split): [N][v]split/new [++opt] [+cmd] [file]----N: The actual number of rows in a new window starting from the top, opt:vim options, cmd: Commands executed in a new window, file: A new window in the real files. Examp
Vim has been learning for nearly two weeks. It is indeed a very powerful editor. I believe it will speed up text more quickly after a while.CodeEditing efficiency.
At ordinary times, I am mainly engaged in Web development. Based on the Asp.net platform, many HTML + CSS + JS + aspx files are edited. I have added some simple settings on the basis of the original settings:
Set nobksy onset aiset nuset Sw = 4 set Ts = 4
Corresponding:
The backu
Workaround:1, first in accordance with the environment of a method to check if the situation is not a second step. 2, modify the terminal term this environment variable: 1) Export command temporarily effective # echo $TERMxterm #如果结果显示: Not "xterm" execute the following command # Export Term=xterm 2) modify configuration/etc/profile# Vim/et C/profileexport term=xterm # Source/etc/profile set crtoptions-->session Options-->terminal-->emulation will ter
#删除光标所在行到最后一行的所有数据d$ or D #删除光标所在处到该行最后一个字符的所有数据D0 #删除光标所在处到该行第一个字符的所有数据DW #删除光标所在处到当前单词的最后一个字符的所有数据Copy Action y:yy or y #复制光标所在的那一整行, and copies the contents to the Clipboard.Yng #复制光标所在行到第N行的所有数据YG #复制光标所在行到最后一行的所有数据y$ #复制光标所在处到该行最后一个字符的所有数据Y0 #复制光标所在处到该行第一个字符的所有数据 Paste:P,p #P在光标之前粘贴, P is pasted after the cursorIndent:>> indent one shiftwidth to the right=-> #自动缩进光标所在行Resources:1. "Brother Bird's Linux private cuisine"2.http://blog.csdn.net/donahue_ldz/article/details/17139361http://detail
1. As a rigorous programmer, you have to care about the characters you've knocked on. These include whitespace characters.2. Sometimes you need to review someone else's code, for those who wantonly use Tab,space,enter. How do you find the messy characters that they left behind?We use VIMWith this configuration:set listchars=tab:→\, trail:,precedes:?,extends:?,eol:? set listchars=tab:→\, Trail:?,extends:...,eol:? set listchars=tab:?\, trail:,precedes:?,extends:?,eol:? Set listchars=tab:>-,trail:.
We often have to open multiple files, different Windows operation of multiple files, split screen is very useful.1 Command mode:: New, new file and split screen, shortcut keys, ctrl+w, and then immediately press N: Spilt horizontal split screen, the current screen is divided into two, horizontal. Ctrl + W, s:vsplit vertical split screen, the current screen is divided into two, vertical. Ctrl + W, v:only cancel the split screen, cancel the current screen, the current screen refers to the cursor s
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
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.