centos vim配置高亮语法和格式化粘贴

centos vim配置高亮语法和格式化粘贴

设置vim别名和高亮grep词语

echo -e "
alias vi=vim
alias grep='grep --color'
" >>~/.bashrc && source ~/.bashrc

vim高亮语法和格式化粘贴

echo -e "

set nobomb
set number
set showmode
set autoindent
set smartindent
set showmatch
set tabstop=4
set softtabstop=4
set shiftwidth=4
set encoding=utf-8
set fileencodings=cp936,gb18030,gbk,gb2312,utf-8,ucs-bom,latin-1
set hlsearch
set noignorecase
set fileformats=unix
set pastetoggle=<F9>
" >> /etc/vimrc

设置后在xshell中查看时会让你有不一样的赶脚。

原文地址:https://www.cnblogs.com/rwxwsblog/p/5848120.html