Ronald Fischer wrote:

> - Notepad++ is similar in this respect. Here you can use the plugin
> "TextFX Tools", which has a command "number lines", which puts line
> numbers in front of the selected text, though in just one standard
> format (with leading zeroes), and I don't know how easy it is to change
> this. Again, you can copy the numbered file to the clipboard and remove
> the line numbers with Control-Z afterwards. You can download it from
> http://notepad-plus.sourceforge.net/de/site.htm
> 
> - You could put the line numbering process outside of the editor, either
> by writing a trivial Ruby program which creates a file with numbers out
> of a text file, or using some of the utilities which are already
> available
> (I use, for example, Cygwin, which has the nl command for numbering the
> lines). Many editors allow running an external program on the buffer -
> examples are (again) jEdit, but also the vi family and, AFIK, Scite too.
> 
> HTH
> 
> Ronald

Thanks Ronald, i'll look at Notepad++.  Currently, i'm doing the 
following, which actually works quite well -

Set up a column in excel with '001', '002', etc.
Paste text from eclipse into the next column in excel.
Copy both columns back into a dummy file in eclipse (the apostrophes in 
the numbers are necessary for eclipse to colour code correctly here)
Then paste the required chunks of code out of eclipse into word - 
colouring all nicely preserved.

thanks for the advice everyone.  i'm still surprised that this isn't a 
standard feature of editors though!
-- 
Posted via http://www.ruby-forum.com/.