1.打开vim配置文件

vi /etc/vimrc

2.设置tab为4个空格, 在文件末尾添加以下内容

if has( "autocmd" )

filetype plugin indent on

autocmd FileType make set tabstop=8 shiftwidth=8 softtabstop=0 noexpandt ab

endif

set tabstop=4

set shiftwidth=4

set softtabstop=4

set expandtab

3.设置自动补全括号,添加以下内容

noremap ( ()<ESC>i

inoremap [ []<ESC>i

inoremap { {}<ESC>i

inoremap < <><ESC>i

4.保存/etc/vimrc文件即可

相关文章:

  • 2022-01-01
  • 2022-01-01
  • 2021-05-05
  • 2021-12-05
  • 2022-12-23
  • 2021-05-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-16
  • 2021-12-27
  • 2021-10-04
  • 2021-11-21
  • 2022-12-23
  • 2021-09-20
相关资源
相似解决方案