June 17, 2022

RHEL 9.0 How to Change the Tab Size in VIM

$ sudo dnf install vim-enhanced bash-completion -y
$ sudo vim /etc/vimrc
...
set tabstop=2
set shiftwidth=2
set expandtab

Set default editor to vim.

$ sudo vim /etc/profile
...
EDITOR=vim

After installing bash completion you need to login out and then login before completion takes affect.

https://stackoverflow.com/questions/2054627/how-do-i-change-tab-size-in-vim

No comments: