CentOS Stream 10: Vim Settings
How to install and configure Vim on CentOS Stream 10, including setting command aliases and customizing .vimrc with syntax highlighting, line numbers, and search settings.
May 25, 2026 • 5 min read
centoscentos-stream-10linuxserverinitial-settingsvimeditorconfiguration
Install and configure Vim on CentOS Stream 10.
Install Vim
dnf -y install vim-enhanced
Set Command Alias
Add an alias for your own environment in ~/.bashrc:
echo "alias vi='vim'" >> ~/.bashrc
source ~/.bashrc
Configure Vim
Configure Vim by editing ~/.vimrc. To apply settings system-wide, add them to /etc/vimrc.
" use extended function of vim
set nocompatible
" specify character encoding
set encoding=utf-8
" specify file encoding
set fileencodings=utf-8
" specify file formats
set fileformats=unix,dos
" take backup
set backup
" specify backup directory
set backupdir=~/backup
" take 50 search histories
set history=50
" ignore case
set ignorecase
" distinct capital if you mix it in search words
set smartcase
" highlights matched words
set hlsearch
" use incremental search
set incsearch
" show line number
set number
" visualize break ($) or tab (^I)
set list
" highlights parentheses
set showmatch
" not insert LF at the end of file
set binary noeol
" set auto indent
set autoindent
" show color display
syntax on
" change colors for comments
highlight Comment ctermfg=LightCyan
" wrap lines
set wrap