Setting set wrap in. vimrc is ineffective today. Later we found that gvim's configuration file is different from Vim's! No culture is terrible ......
First, the current user directory contains three files and folders.. VIM: this is the place
1. Use Vim's comparison mode to open two files:Vim-D file1 file2OrVimdiff file1 file2
2. If the file file1 has been opened, open another file file2 for comparison:: Vert diffsplit file2If the vert command is not used, diffsplit will split up and
The encoding in VIM is mainly related to three parameters: ENC (encoding), fenc (fileencoding), and fencs (fileencodings)
Fenc is the encoding of the current file, that is, a file that has been correctly displayed in VIM (the premise is that your
Remote login to the server using Vim to edit and view files on the terminal often encounter various Chinese garbled characters.Make the following settings to basically solve the problem of VIM Chinese garbled characters
First, check the system's
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
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
1
, Configuration file location Under the/etc/directory, there is
Vimrc
File, which is a public Vim configuration file in the system and is valid for all users. In each user's home directory, you can create a private configuration file named"
.
2011-03-27 wcdj
Let's take a look at a simple tutorial.
Fix indentation and tabs in VIM
Thanks to the folks in # Vim on freenode, here's a quick tutorial onHow to fix the indentation and tabsIn an XML file from within Vim...
First find out what
-- Help ---------------------------------------------------------------
\ HM show manual for word under the cursor (n, I)\ HP show plugin help (n, I)
-- Comments -----------------------------------------------------------
\ Cl end-of-line comment (n,
I am not disgusted with the Linux system, but I am disgusted with complicated command operations. I feel that as a programmer, I should focus on the Code architecture and writing, rather than memorizing these commands.
I wrote this article
The Code pasted into Vim from other editors is often messy due to abnormal indentation.Format full text: Gg = GAuto indent current row: =Format the next 10 rows of the current cursor: 10 =Format the selected row: V (select from top to bottom)
First install ctags and cs.pdf:
$ Sudo apt-Get install ctags cs.pdf
Then, execute the script in the folder where you want to create an index to generate the required out file. The script is as follows:#! /Bin/sh Find. -Name "*. H "-o-name "*. TCL
Search for characters
Command F is used to search forward within the row. For example, FX searches for the forward letter X. The command F searches backward (backward. For example, FX searches backward for the letter X. Similar to F and F, they are
Summary of common replacement modes in vim.
0,: G/null/d
Locate the null row and delete it.
1. Simple replacement expression
The replacement command can replace another word with one word in the full text:
: % S/four/4/g
The prefix of "%" indicates
Original article: Workshop
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
I don't know if you have encountered such a need. When you use two windows (in Emacs or windows in VI) to write two files, you suddenly think that the content of the two forms (buffer) should be) swap it for easy viewing. In gvim, you can use ctrl-w
1. Prepare the winmanger plug-in. Click the following URL:
Http://www.vim.org/scripts/script.php? Script_id = 95
2. decompress the package and obtain the plugin and Doc folders. Copy them to a directory similar to c: \ Program Files \ Vim \ vim7
[Translation]
"/Zs and/ze RegEx delimiters: H // Zs
"/ZsAnd/zeRegular Expression Symbol: H // Zs
/] */ze>: Search for tag contents, ignoring chevrons
Search XMLMarked content, ignore angle brackets
[Annotation]
: Help // Zs
: Help // ze
This
Common editing commands in vim and Shell
Because many of the operations in Linux and Linux are implemented through the command line, mastering some simple command line operations will greatly save our time in unnecessary steps, now we will summarize
Reprinted: http://andyss.blog.51cto.com/315552/131652
Syntax: [ADDR] S/source string/destination string/[Option] global replacement command: % S/source string/destination string/g
[ADDR]
Indicates the search range. If it is omitted, it indicates
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