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. Ubuntu 11.10 How to Auto Login gnome-shell Gnome3 Desktop
  2. Enable Number pad NumLock at startup in Ubuntu Login Window
  3. Malformed line 62 in source list /etc/apt/sources.list (dist parse)
  4. ComputerTip:Use Number Pad as Mousekeys to Move cursor on the screen
  5. Windows 7 auto-change background wallpaper functionality in Ubuntu Desktop

    Add a Comment

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