Author: | Thinkhy |
Date: | 2010.02.06. |
Keyword: | Vim encoding fencview utf-8 |
Windows下使用VIM有个麻烦事就是经常会遇到乱码,VIM无论怎么配置都不能同时对cp936和utf-8同时支持得很好,很多时候只能先利用记事本的另存功能换个编码保存才能打开。只到在水木VIM版看到有网友推荐的fencview插件,才算比较完美的解决Vim打开utf-8编码文件的问题。
(1) [ 插件的名称 ]
fencview.vim
(2) [ 插件的功能 ]
我就来推荐一下我自己的插件^_^新版本完善以后就会更新到vim.org FencView.vim : View a multi-byte encoded file in different encodings. script karma Rating 30/12, Downloaded by 139 created by Ming Bai script type utility description Install: Copy FencView.vim to your plugin directory. Usage: Select a encoding from the Tools/Encoding menu just like what you did in Firefox/IE or you can use ":FencView" command to open the encoding list window and "Enter" key to select the encoding under cursor to reload the file. ScreenShot: http://mbbill.googlepages.com/fenc.png
(3) [ 插件的下载地址 ]
http://www.vim.org/scripts/script.php?script_id=1708
(4) [ 备注或特别提醒 ] 在Windows系统,fencview插件仅对utf-8识别保持较高的准确度,对gbk和utf-16的识别正确率还有待提高。
(5) [ 推荐人id ] mbbill
-
fencview插件安装非常简单,将下载的fencview.vim文件拷到(~/vimfile)。安装完再配置文件_vimrc, 添加一行:
-
let g:fencview_autodetect = 1