When we use VI or vim, if we want to display the row number, we may do this: switch to the command mode, enter SET Nu, and then press the Enter key to display it; and we are writingProgramSometimes, when you want to press the Enter key, the cursor
It is usually a development project in Windows. The latest work environment requires development in Linux. Although it is not suitable at the beginning, it is much better now. But compared with development in windows, there is always something
(1) easy to forget but commonly used operations:
(1) mobile
W/W: Move to the beginning of a word, case-insensitive punctuation
E/E: Move to the end of a word. The case difference is the same as above.
B/B: Move to the beginning
H/m/L: Move to screen
To facilitate Text Selection, VIM introduces the visual mode.To select a text segment, first move the cursor to the beginning of the segment, press V in normal mode to enter the visible mode, and then move the cursor to the end of the segment. Note
Vim allows you to place custom tags in the text. Run the "Ma" command to mark the current cursor position with. You can use 26 tags (A to Z) in the text ). These tags are invisible, but they are only remembered by VIM.
To jump to a tag you defined,
1. Use the * Key to search for words at the cursor position. Otherwise, you can use the # key to search for words at the cursor position forward. After you use * or # For the first search, you can use N or shift-N to continue the search.In addition,
On the Linux server, VIM is used to editing configuration files and programming.
Generally, you need to configure the vim environment on your own to get a new server. Otherwise, you may not feel comfortable.
Vim initial configuration file
Vim is a powerful text editor. We use VC to write on the Win32 platform
Code Often, we are used to some of the format control and code complementing functions provided by VC. These functions can be implemented in Vim, and we have already prepared
I have introduced some Vim plug-ins before. There are two plug-ins that are convenient for iOS writing.Program, That is, cocoa and objc_matchbracket (hereinafter referred to as objc_mb ). The cocoa plug-in is mainly used to complete the API name of
: Ls list the buffer list
: Buffer #Open the file in the corresponding buffer area code: Bnext: Bprevious: Bfirst: Blast
: PwdShow Current Directory
: CD directory nameChange current directory
: E file nameCreate a file in the current directory
Recently, I have re-installed vim and compiled and deployed it to complete the plug-in ycm. The plug-in's completion effect and the error message automatically prompted when writing C code are still very good. I can't help but write it down, you can
Document directory
1. Basic replacement
2. You can use # As the separator. The/in the middle will not be used as the separator.
3. Delete ^ m from the file
4. Other skills
Programs that use the Linux environment for development often compete
Install python. Vim syntax highlighting
Copy python. Vim ~ /. Vim/afer/ftplugin
In ~ /. Add configuration in vimrcSet autoindent "same level indent
Set smartindent "Next level indent
Set expandtab
Set tabstop = 4
Set shiftwidth = 4
Set softtabstop
1. Navigate to 1.1. view the row number
: Set numberShow row number
:. =Display the current row number at the bottom
: =Display the total line number at the bottom
1.2. move the cursor
0^Move the cursor to the beginning of the
This is the first time I learned how to use the vim editor.
1. First list common shortcut keys
U indicates revoking the previous step.
X indicates deleting the cursor position.
Dd indicates deleting the content of the row where the cursor
This tutorial describes some basic tips for using VIM in different working modes: insert mode, command mode, and file access. The goal is to help new users who have just been familiar with VIM use this excellent editor more efficiently.
(In this
Today, I will share with you my vim configuration, which is just a personal habit. If necessary, replace the following content copy ~ /. Vimrc content:
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" set fileencodings=utf-8,latin1endifset tags=./tags,..
Command history
Commands starting with ":" and "/" have historical records. You can first type ":" or "/" and then press the up or down arrow to select a historical command.Start vim
Enter the following command in the command line window:
Vim
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