Two steps:
1. Remove the annoying VI consistency mode to avoid bugs and limitations in earlier versions.Set nocompatible
2. There are several ways to work with backspace. By default, backspace is VI compatible. This is not a habit for new users.
1. Compile (compile)
Meaning: Use the compiler (compile)Source codeGenerate a binary target file. It is. OBJ in window. It is a. o file in Linux.
Requirements: required by the compiler. The syntax is correct. The compiler detects
Configuration File Path:/etc/Vim/vimrc
SYN on; syntax highlighting
Set tabstop = 4; tab width
Set shiftwidth = 4; line feed indent width
Set backspace = 2; Set backspace availability
Set incsearch; Search auto-completion
Set Ai! ; Set
In the past, the vim provided by Debian was Vim. Tiny. syntax highlighting and other functions were not supported. Run the following command to find that Vim is under/usr/bin.
Whereis Vim
The following command shows that both VI and Vim are linked
Edit a binary file
Vim can easily edit binary files. I personally think it is easier to edit binary files than Emacs. In vim, the binary file is edited by dumping the file into its binary text format through the external program xxd, and then the
Use gvim to establish an IDE programming environment (Windows)
Note: This article describes how to use gvim to build an IDE environment on Windows XP Based on the famous article "how to convert Vim into an IDE programming environment.Original
Vim's learning curve is quite large (see the learning curve of various text editors). Therefore, if you see a lot of VIM command classification at the beginning, you will lose interest in this editor. The following article is translated from "Learn
1. install and use ctags in VIM
Http://blog.csdn.net/duguteng/article/details/7412652
2. Install the vim plug-in taglist in Ubuntu
Http://www.lampblog.net/2010/08/ubuntu%E5% AE %89%E8%A3%85vim%E6%8F%92%E4%BB%B6taglist/
3. Vim file browser
Vim-complex repeats
Vim can record your operation combinations into registers, and then call this operation combination through the shortcut key, which is very quick. In normal mode, enter:
Q {0-9a-za-z "} → Q starts recording, {0-9a-za-z"}
In the past, when setting the VI encoding method, the relevant method was directly found on the internet, mainly to add the following content to the/etc/vimrc file:
Set fileencodings = UTF-8, Latin-1, gb2312, GBK, gb18030Set termencoding = UTF-8Set
VIM + \ latex + tth + Python + metaweblog API blog writing strategyVIM + latex + tth + Python + metaweblog API write blog introduction mdyang Chapter 1
Preparations
First, install the latex environment. This article uses Ubuntu + Tex live and the
There are a lot of plug-ins on the Internet about how to configure, use VIM + ctags + csloud for code viewing and editing tools, I write mainly at the entry level, with the help of various scripts, you can quickly build a better development
There are three programming tools in the world: Emacs, Vim, and various ides. Over the past 10 years, the IDE programming environment has gained considerable market position thanks to the great promotion of funds. However, the historical development
File Operations
Vim 【VI]// Open an empty file
Vim [VI] a.txt// Open the.txt file in the current directory. If the file does not exist, create a file named a.txt (specify the storage location as the current directory)
Vim [VI] E: \ a.txt// Open
Vim command: % S/^ \ n/g
It indicates that all the characters starting with the carriage return are replaced with null.
By the way, I studied
If there are multiple consecutive empty rows, you want to keep one
Vim command: % S/^ \ N $/g
Vim Help File (Chinese ):
Http://vimcdoc.sourceforge.net/vim_user_manual_603.0.pdf
We strongly recommend that beginners of VIM be afraid of reading help files! Thanks to the translator zhaorufei.
Vimdoc project home page in:
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 that replacement is performed in all rows.
Some advanced editors will contain macro functions, which are certainly not missing in vim. It is very convenient to use Macros in vim:
: Qx starts to record macros and saves the results to register xQ exit record mode@ X macro commands for playing
* Locate the specified row n:
Enter "nG"
Or enter "ngg"
Or enter ": n"
Here, n is the row number of the specified row. Note that sometimes G = gg* Jump to the top of the screen:
Enter "H"
This is the first non-empty character. Adding a number N
The pristine state
I was watching a violinist bow intensely and I had this thought: I probably have as your brain cells converted Ted to my text editor as he does to playing his chosen instrument. is it outlandish to imagine that an MRI of his brain
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