vim 使用之窗口显示路径、编码及等相关属性

来源:互联网 发布:悠悠球淘宝正品店 编辑:程序博客网 时间:2024/06/05 07:00

打开终端:

vim ~/.vimrc

编辑文件:

set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
"set fileencodings=gb18030,ucs-bom,utf-8


set nocompatible
set history=500
set ruler "打开状态栏标尺
set confirm
"set relativenumber "设置相对行号
"set number "显示行号
"filetype on
"filetype plugin on
"set cursorline "突出显示当前行
set tabstop=4 "设定tab长度为4
set laststatus=2 "显示状态栏
set statusline=\ %<%F[%1*%M%*%n%R%H]%=\ %y\ %0(%{&fileformat}\ %{&fileencoding}\ %c:%l/%L%)\ [%p%%]\


"set statusline=%F%m%r%h%w\[POS=%l,%v][%p%%]\%{strftime(\"%d/%m/%y\ -\ %H:%M\")}


保存!

效果如下:


0 0