Www.vim.org command: Set nu to use VI more quickly, we need to master several sets of commands {#1, [INSERT command] A, A, I, I, O, O #2, [positioning command] H, J, K, L, $, 0, H, M, L: Set nu to set the row number: setnonu cancel the number Gg to
Some terminals can be restored to the status of the terminal before vim is enabled after Vim is exited, similar to the following:
$ Vim/etc/sysconfig/
#### Enable Vim #####
Sdskk, some file content
: Q
$ Vim/etc/sysconfig/# restore the
The purpose of content scrolling is to move the content so that we can better watch the content. However, the content and the cursor position remain unchanged! Stage 1: C-F/B/u/D C-E/y prepare a large text file. I just want to browse the text. hjkl
This article sets Vim only for Ubuntu and Fedora systems. In ubuntu, the vim configuration file is stored in the/etc/Vim directory, and the configuration file name is vimrc.
In fedora, the vim configuration file is stored in the/etc directory. The
Modify the vim configuration file in Ubuntu to make it easier for CProgramDesignAnother simple method
1. Input Vim ~ in the terminal ~ /. Vimrc press ENTER2. Enter the following content:"Display row number: Set nu
"Tab width: Set Ts = 8
"Auto
[Vim] Vim settings for displaying row numbers, syntax highlighting, and automatic indentation
I have never tried fedora in other Linux versions. Please forgive me! Thank you.
In ubuntu, the vim configuration file is stored in the/etc/Vim directory.
Note:
In the following example, xxx indicates entering XXX in command mode and press Enter.
In the following example: XXX indicates entering XXX in extended mode and press ENTER
The commands in parentheses indicate related commands.
The command
References:
1. http://www.cnblogs.com/samwei/archive/2011/04/25/2026211.html
1. Grammar highlighting
To support Python syntax in Vim, plug-in python is required. VIM: this plug-in is located under //syntax/by default. If you do not find this
In vim, there are four encoding-related options:fileencodings,fileencoding,encodingAndtermencoding. In actual use, any option error may cause garbled characters. Therefore, eachVim users should clarify the meaning of these four options. The
Project ("project" management of files)
Author:Aric blumer
Installation instructions:
1. download the latest version (project-1.3.tar.gz) on the vim website );2. Use the tar xvfz project-1.3.tar.gz-C ~ /. Vim "unlock;3. Run ": helptags ~" in vim ~ /.
Copy the following code ~ /. Vimrc (~ Is your main directory. If ~ /. Vimrc, touch one to be in ~ Touch. vimrc,
. Vimrc is a hidden file, in ~ Enter LS-a to check whether the file exists ):
Set nocompatibleSet numberSet autoindentSet smartindentSet
Configure the vim shortcut for opera:
Compared to Firefox/chrome, opera does not use Vim plug-ins. Therefore, you can only manually configure the shortcut key to partially achieve functions similar to vimperator and vimium.
The common shortcut keys
View File encoding
Highlight the current row set cursorline
Highlight the current column set cursorcolumn
Delete linefeed J
Definition of work iskeyword
Exchange two characters in XP
Move to the end of GE <> E blank Definition
Blank and bounded
1. ctags
(1)
Http://prdownloads.sourceforge.net/ctags/ctags-5.6.tar.gz
Download ctagssource code ctags-5.6.tar.gz
(2) decompress and install
Assume that the taogle user's directory is in the home directory:
Tar zxvf ctags-5.6.tar.gz
CD ctags-5
Use Vim to write C/C ++ programs (reprinted)Use Vim to write C/C ++ programs
VI is the most common text editor in UNIX. Vim (VI improved) is its enhanced version. Some people often compare Vim with Emacs. Although Vim does not have as many features
[Cr + Z] Go to Shell
Shell
$ FG return to the original editing area
So convenient !! In this way, compile and run it, and you can cut it out. Good.
You can also execute various command lines in VIM :! G ++ file :!. /A. Out :! + Various
Stage 1: U c-r [secondary memory: Undo redo] Hey, Tom, my sister deleted important things. What should I do? Solve the problem by u in normal mode! Not enough? 3u 6u 10000u thank you ~ White, u pressed a few more, undo too much ~ Then c-r will be
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.