vi editor settings

GEEKS !!

Sorry for a long gap in between posts.

I know you had been using vi editor since your RHCE Training and  for long. But here goes some of the important settings in vi editor. That can be helpful.

Never mind if you know some, or all.

=> Show line numbers
set number

=> Display “– INSERT –” when entering insert mode
set showmode

=> Incremental search
set incsearch

=> Highlight matching search terms
set hlsearch

=> Set ic means case-insensitive search; noic means case-sensitive.
set noic

=> Do not wrap lines
set nowrap

=> Set the mouse to work in the console
set mouse=a

=> Keep 50 lines of command line history
set history=50

=> Show the cursor position
set ruler

=> Do incremental searching
set incsearch

=> Save a backup file
set backup

=> The visual bell flashes the background instead of an audible bell.
set visualbell

=> Indent new lines to match the current indentation
set autoindent

=> Don’t replace tabs with spaces
set noexpandtab

=> Use tabs at the start of a line, spaces elsewhere
set smarttab

=> Show syntax highlighting
syntax on

Advertisements