Pages

Friday, October 12, 2012

Vi tricks

How to set the line numbers into vi editor?
Everyone knows this:
a) cd
-- go to home directory
b) edit(create if not there) a file called .exrc, and all this line
set nu
or set number
Simple.

But, what I al now looking at is how to set the vi line numbering in only a special work directory, say /home/kdutta/mywork. I do not want to set vi line numbering to all directories, at times this is annoying.
Putting a .exrc file into /home/kdutta/mywork/.exrc does not seem to work, here, even if I source it.

Do you know, how to do that?

No comments: