解决linux下vi vim乱码问题

五月 20th, 2010 Posted in Shell | 阅读次数: 1,567 次

Author:gaojinbo
Time:2010-5-20

很多时候需要在linux直接用vi或vim对文件进行编辑,然而好多文件又是gbk编码或windows上复制过去的,常常会出现乱码,严重影响正常工作。

 

根据下面的方法,很容易解决vi乱码问题

1.修改vi配置
vi /etc/virc
增加一行:
set fileencodings=utf-8,gbk,ucs-bom,cp936

 

完成!

相关日志:

Tags:

One Response to “解决linux下vi vim乱码问题”

  1. Related Resources Says:

    My Recommended Websites…

    [...]some new websites on the web we love, even if they are not related to ours. Check them out[...]…


留下您的脚印