LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Blogs > reverend27
User Name
Password

Notices


Uncategorized Entries with no category
Old

Show line numbers in VI - Ubuntu Linux/Mac OS X

Posted 03-01-2012 at 11:02 AM by reverend27

From within VI

:set number

To make this behaviour the default:

user@machine:~$ cd ~
user@machine:~$ touch .exrc
user@machiner:~$ vi .exrc

Add the following line to the file:
set number

user@machine:~$ . .exrc
user@machine:~$ vi someTextFile.txt

Basically, if the file .exrc does not exist in your home directory create it.
Open .exrc for editing.
Add the line (w/o quotes)...
LQ Newbie
Posted in Uncategorized
Views 1589 Comments 0 reverend27 is offline

  



All times are GMT -5. The time now is 03:08 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration