Enhancing the vi (or vim)

From Tech-Wiki
Revision as of 22:53, 10 July 2016 by Fabricio.Lima (Talk | contribs) (Created page with "To enable syntax highlighting on Vim, type: syntax on To enable line numbering, type: set number To enable auto indenting, type: set autoindent Or you can edit your ~...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To enable syntax highlighting on Vim, type:

syntax on

To enable line numbering, type:

set number

To enable auto indenting, type:

set autoindent

Or you can edit your ~/.vimrc and type:

syntax on
set number
set autoindent
set showmatch           " briefly jump to matching bracket when inserting one
set expandtab           " expand tabs to spaces (use :retab to redo entire file)
set wrapscan            " allows search to wrap to top of document when the bottom has been hit
set tabstop=3           " width (in spaces) that a <tab> is displayed as
set shiftwidth=3        " width (in spaces) used in each step of autoindent