[ace]# cat ~/.vimrc
filetype indent on
set smartindent
set smarttab
" 取消行号可使用 set nonu
set nu
set expandtab
" 设置 Tab 键宽度为 4 个空格
set tabstop=4
set softtabstop=4
set shiftwidth=4
" 开启语法高亮
syntax on
" 设置文字编码自动识别
set fencs=utf-8,cp936
" 输出到终端时采用的编码类型
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8
" 设置高亮搜索
set hlsearch
" 输入字符串就显示匹配点
set incsearch
" 输入的命令显示出来,看的清楚些。
set showcmd
" 突出显示当前行
set cursorline
" 设置自动缩进,即每行的缩进同上一节相同
set autoindent
bashrc尾行添加配置
[root]# cat ~/.bashrc
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias vi='vim'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi