Mingw + msys + gvim

Source: Internet
Author: User
1. Install mingw
Install it to: C:/mingw. You 'd better download the automatic installation version to mingw.

2. Install msys to the mingw home page to download the latest version of msys: URL: http://www.mingw.org/download.shtml
In the download list, current-msys is the msys Installer. Download its binary version (BIN) and install it under C:/msys/1.0. Specify the mingw position in the middle.

3. Modify the msys configuration file
Modify/etc/profile (the Windows path is C:/msys/1.0/etc/profile) and add the following lines at the end:
Export PS1 = '[/u @ msys/W] $'
Export PS2 = '>'
Export PS4 = '+'
Export lang = en
Alias L = '/bin/ls -- show-control-chars -- color = tty'
Alias LA = '/bin/LS-af -- show-control-chars -- color = tty'
Alias LL = '/bin/LS-alf -- show-control-chars -- color = tty'
Alias ls = '/bin/ls -- show-control-chars-f -- color = tty'

Modify C:/msys/1.0/msys. bat, find the startrxvt section, and modify it to the following:
If "X % mingw32bgcolor %" = "X" set mingw32bgcolor = black
If "X % mingw32fgcolor %" = "X" set mingw32fgcolor = white
Last modification:
Start rxvt-Sl 2500-FG % fgcolor %-BG % bgcolor %-Sr-FN "Ms Gothic"-24-Tn msys-geometry 90x30-E/bin/sh -- login-I
Exit
Note: do not include-backspacekey ^ h, so that the shell cannot return...

4. Configure environment variables:
Path C:/mingw/bin;
LIBRARY_PATH C:/mingw/lib
C_included_path C:/mingw/include
Cplus_include_path C:/mingw/include/C ++/3.4.5

5.shself-carried vimis not easy to use, use gvim, download gvim71.exe after installation
: E $ myvimrc
Add:
Set number
Set filetype = C
Colorscheme torte
Set guifont = lucida_console: H16, etc.
See http://edyfox.codecarver.org/html/_vimrc.html for details
A little trick is to write CD in _ vimrc so that you can enter the program directory as soon as you open gvim,
For example, the gvim installation directory is D:/gvim/Vim/vim71,
The program directory is D:/Ubuntu/Program (to facilitate programming and sharing in Ubuntu)
Add:
CD ..
CD ..
CD ..
CD/Ubuntu/program.
Similarly, you can add the corresponding statement in vimrc in Ubuntu to/Ubuntu/program, which will save a lot of time to switch directories.

Related Keywords:

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.