我的Vim配置

    技术2022-05-19  17

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

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

     

     

    if &t_Co > 1                    syntax enable     colorscheme mycolors

    endif

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


    最新回复(0)