ArticleDirectory
Replace the _ vimrc file in the installation directory with the following code:
Replace the _ vimrc file in the installation directory with the following
Code You can:
Set nocompatiblesource $
1. Installation Steps
1) download the installation package [1]
2) copy the plug-in to the plugin directory.
My options are:/usr/share/Vim/vim73/plugin.
3) edit the vimrc File
My directory is at:/etc/vimrc
"F4 quick format JSCode
Nnoremap
There are already manyArticleI will explain how to create Vim into the IDE, so I will not elaborate on a lot of details in this article, just paste my vimrc configuration file and briefly describe the keyboard binding.
My Vim configurations mainly
The use of various major Editors is not satisfactory. notepad ++ is recommended by many people, but zencoding is too stingy. For me, other reasons such as the UE startup is too slow.
You have to use the following artifacts:
Download vim,
Http:/
Sometimes, copy text (especiallyCode) To vim, the format will be disordered. It seems that automatic indentation is a curse. This article does not go into the cause and provides a solution.
1. paste Mode
Run the following command to enter the
1. VI Operation ModeVI provides two operation modes: input mode (Insert mode) And command mode (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
ArticleDirectory
1. Create a new tab
2. Remote-tab function of gvim
3. jump between tabs
4. Tab sorting
5. Optimize the display of tab names
6 tabs and sessions
Although I have been using Vim to writeProgramAnd
Move the cursor
H j k l key:
Number Parameter 4l move 4 characters to the right
Move cursor paragraph0 beginning and end of $W moves to the right based on the distance of a wordB moves to the left based on the distance of a word.
I insert the
Download link taglist_45 ctags-5.7.tar vimcdoc-1.6.0 (taglist ctags Vim Help)
1. ctags:
Download ctags-5.7.tag.gz
Tar xzvf ctags-5.7.tag.gz
CD ctags-5.6
./Configure
Make
Sudo make install
The directories may be different during
ArticleDirectory
Character Deletion
Delete words
Delete row
In this section, let's take a look at the deletion. The deletion command is relatively simple, but to make the deletion more efficient
You need to work with the
Vim/gvim character encoding in Chinese Windows has two problems:
No encoding detection function by default
If a file uses a Character Set Larger than GBK (such as UTF-8, UTF-16, gb18030), then the corresponding characters in the GBK will
InWindowsUsed inVimYou can select"Edit with vimTo open the file. However, files opened in this way will be opened in the new window, insteadUltra EditOpen it in a new tab.
Vim 1, 7.0Tabs are already supported. How can I create a new tag instead of
In VI/vim, you can use the: s command to replace the string. This command can be used in many different ways to implement complex functions.
: S/Vivian/sky/Replace the first Vivian in the current row with sky
: S/Vivian/sky/gReplace all Vivian
Use Vim to write c ++CodeBasically, there are not many completion plug-ins to choose from. I use omnicppcomplete. This plug-in relies on tags for completion, and the effect is unsatisfactory.
Clang complete was found some time ago, and the effect
1. Let's take a look.
2. configuration method
.
If the following effect is not specifiedCodePrompt shortcut key (such as Ctrl + p), to see the effect, do not really want visual assist.
1.1 code prompts for structure struct and enum
ArticleDirectory
1 encoding
2 termencoding
3 fileencoding
4 fileencodings
5 fencview
If you use the SSH terminal securecrt (Putty is the same)ProgramConnect to the Linux server. garbled characters are displayed by default
In a Linux environment, if you directly use the VI/Vim command to edit files without modification permissions, you will be prompted not to save the files, the general solution is to close the file and re-open the file with the sudo
Vimfx, as the name suggests, is a very useful tool found yesterday, VIM for Firefox ,...This extension allows FX to perform common operations very quickly like vim, such as creating a new tab, quickly disabling the tab, fast refreshing, fast
VI/Vim basic usageThis article introduces the basic usage of VI (Vim), but it is enough for common users!
The VI editor is a standard editor for all UNIX and Linux systems. It is not inferior to any of the latest text editors. Here we just briefly
1. securecrt
Settings in session
1) Session option → select the font (New, or fix-sys, or others), and select chinese_gb2312 for the character set.
2) Vim/etc/sysconfig/i18n
Lang = "zh_CN.UTF-8"
3) VI ~ /. Bash_profile
Export lang = zh_CN.UTF-8
2.
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