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