How to get line number count and auto-indent in VIM
This post was written by admin on November 8, 2009
Posted Under: General
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:
- Malformed line 62 in source list /etc/apt/sources.list (dist parse)
- Boot into console/command line when startup Ubuntu 9.10
- Auto mount ntfs drive when login your ubuntu
- Save Ubuntu space-auto-delete downloaded packages after installation
- Empty Ubuntu Gnome Trash in command line
Tags: ubuntu terminal
