Vim部分配置


主要用Vim写普通文档和Python脚本,怕以后配置的时候忘了,先记下来。

设置默认打开路径:

cd <PATH>

设置检测若干种编码,且默认保存为utf-8(Win):

set fileencodings=utf-8,ucs-bom,cp936,gb18030,big5,euc-jp,euc-kr,latin1
set fileencoding=utf-8(这行貌似可以不要)

设置自动缩进为四个空格:

autocmd FileType python setlocal et sta sw=4 sts=4

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s