Tuesday, March 23, 2010

how to add line numbers into a document?

Hi VI gurus,
I have a text document with ~500 lines. I want to add a numbering ~to~ this document at the beginning of every line. So for example if it's:

This is sentence 1
This is sentence 2
And this is sentence 3

I want it to become:

1. This is sentence 1
2. This is sentence 2
3. And this is sentence 3

Is there a way to do this in VI? To be clear, I want to actually add the numbering to the document, as opposed just have line numbering of the document in a sidebar.

Thanks!
-Sid

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
 
To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments: