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

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

设置vim别名和高亮grep词语

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

vim高亮语法和格式化粘贴

echo -e "\n\nset 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>\n" >> /etc/vimrc

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

上一篇:leetcode 路径总和III 中等


下一篇:【Leetcode刷题篇】- Leetcode1171 从链表中删去总和值为零的连续结点