我的Vim配置

Vim配置详解

我的vim配置文件vimrc:

"=================== "base configure "use vim defaults set nocompatible "set backspace set backspace=indent,eol,start "display line number set nu "================== "================ "syntax highlight "if the terminal support nulticolor, enable syntax highlight if &t_Co > 1 syntax enable "set color configure file colorscheme mycolors endif "================= "================ "C automatic indent filetype indent on "amount of space set cindent shiftwidth=4 "================

说明:

set backspace=indent,eol,start
indent: 如果用了:set indent,:set ai 等自动缩进,想用退格键将字段缩进的删掉,必须设置这个选项。否则不响应。
eol:如果插入模式下在行开头,想通过退格键合并两行,需要设置eol。
start:要想删除此次插入前的输入,需设置这个。

不设置此项的话,可能会出现退格键(Backspace)无法使用的情况,因为vim默认为vi兼容模式。

if &t_Co > 1
syntax enable
colorscheme mycolors

endif

如果终端支持彩色,就使能语法高亮,并且使用mycolors配色方案。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值