网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   PHP (https://www.0058.net/forumdisplay.php?f=75)
-   -   Gvim开发环境配置笔记--Windows篇 (https://www.0058.net/showthread.php?t=4863)

Valdosta 2014-11-25 10:17 PM

Gvim开发环境配置笔记--Windows篇
 
环境:Windows7 旗舰版

1、安装Gvim7.3 : 下载地址http://www.vim.org/download.php#pc。

2、安装中文帮助:vimcdoc-1.8.0-setup.exe 地址http://vimcdoc.sourceforge.net/

会自动识别gvim的安装路径,

安装完后,gvim菜单中文出现乱码,在_vimrcset文件中增加:

" 配置多语言环境,解决中文乱码问题

if has("multi_byte")
" UTF-8 编码
set encoding=utf-8
set termencoding=utf-8
set formatoptions+=mM
set fencs=utf-8,gbk
if v:lang =~? '^/(zh/)/|/(ja/)/|/(ko/)'
set ambiwidth=double
endif
if has("win32")
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
language messages zh_CN.utf-8
endif
else
echoerr "Sorry, this version of (g)vim was not compiled with +multi_byte"
endif

输入:help,显示中文帮助,说明安装成功


3、设置语法高亮

编辑安装目录下的_vimrc文件(例如:我的在D:\Program Files\Vim)

加入以下内容:

set nu!

colorscheme desert
syntax enable
syntax on


All times are GMT +8. The time now is 12:26 AM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.