Vim Installation tutorial on Win7

Source: Internet
Author: User

1. Download

Currently vim on its official website is the latest version of the 7.4,windows version named Gvim, in the Baidu software can download the latest version of Gvim, recommended

In Baidu download, because relatively fast. Search for "GVIM" on Baidu to find the download link. Download the method for the VIM website.

2. Installation

  The installation of the Gvim is very simple, click Next to do it.

3. Settings

  After installation, open the Gvim graphical interface as follows:

This interface is the default interface, we can set the desired interface, and save these settings to the file, the subsequent GVIM will be used when open

User's settings. In the Gvim installation directory, you can find the _VIMRC (no suffix prefix) file, we set the command is written in this file. With Notepad

or other text editor to open this file, we will add the following:

1, display line number : We often need line number to jump in the file, but Gvim does not display the line number by default, we add "set Nu" at the end of the file

command to set the display line number.

2, set the color scheme : GVIM The default background color is white, we can set their own color scheme, GVIM There are many color schemes, color party

The file is placed in the installation directory. /vim74/colors folder, I used the scheme is desert, so at the end of the file add "Colo Desert" statement.

3. Hide menus and toolbars : If you feel that the menu bar and toolbars are too annoying, you can set them to hide. Use the following statement to hide the menu bar and tools

Bar, and map the <F2> keys to show/Hide menu, toolbar functions, set the following statement:

"Hide the menu bar and toolbars

Set Guioptions-=m
Set guioptions-=t
"Maps the F2 key to show/hide menus, toolbar keys
Map <silent> <F2>: If &guioptions =~# ' T ' <Bar>
\set guioptions-=t <Bar>
\set Guioptions-=m <bar>
\else <Bar>
\set guioptions+=t <Bar>
\set Guioptions+=m <Bar>
\endif<cr>

  4. Set tab Space: Use the statement "set tabstop=4" to set a tab to occupy four space widths.

  5. Set line spacing : Gvim The default line spacing is beautiful when editing English content, but editing Chinese content can be crowded and

"Set linespace=4" set line spacing of 4, on my computer with a pitch of 4 looks good, you can set according to your needs.

  6, set the length of the line : Gvim The default line length is 78, when you enter text, if more than this length is automatically break, we can according to their own

To set the length of the line, set the line width to 100 by the statement "settextwidth=100".

The overall code is as follows:

  

  When you are done editing, close the _VIMRC file, and then open Gvim, you can see the changes in the Gvim appearance:

    

Vim Installation tutorial on Win7

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.