vi不能使用退格键和上下左右键

因为ubuntu默认安装的是vim-tiny,所以需要安装完整版本

apt-get install vim

安装完再使用就可以了



vi本身是不带颜色的,vim带颜色,使用下面的命令,再次使用 vi就可以带颜色了

 alias vi=vim


常用设置: 

set nu #行号

set autoindent

set cindent

set hlsearch #高亮显示查找内容

set incsearch

set shiftwidth=4  #设置shitt键为4个空格

set softtabstop=4

set tabstop=4 #设置tab键为4个空格

set smartindent

syntax on #语法高亮显示

set ls=2 #显示当前文件名

相关文章:

  • 2022-01-03
  • 2022-12-23
  • 2021-06-28
  • 2021-11-29
  • 2021-11-29
  • 2021-12-29
  • 2021-10-22
猜你喜欢
  • 2021-07-06
  • 2022-12-23
  • 2021-11-29
  • 2021-07-27
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
相关资源
相似解决方案