How to get line number count and auto-indent in VIM

This post was written by admin on November 8, 2009
Posted Under: General

It becomes really tough while editing file using vim without knowing which line there is.This tutorial shows this howto in Ubuntu/Feroda.
Edit vimrc file:

sudo gedit /etc/vim/vimrc

or (in Feroda) use:

sudo gedit /etc/vimrc

1.Add this line to the end of file.

set nu

This will get the line number count to appear in the vim screen.
2.To enable auto-indent,you can add following into the file:

set autoindent
set cindent

The second line is specially for C.

Related posts:

  1. Malformed line 62 in source list /etc/apt/sources.list (dist parse)
  2. Boot into console/command line when startup Ubuntu 9.10
  3. Auto mount ntfs drive when login your ubuntu
  4. Save Ubuntu space-auto-delete downloaded packages after installation
  5. Empty Ubuntu Gnome Trash in command line

    Add a Comment

    required, use real name
    required, will not be published
    optional, your blog address