PrintWithLNum : Prepend line numbers to each line for printing
| script karma
Downloaded by 1253
Comments, bugs, improvements
script versions (upload new version)
|In response to a query on the vim mailing list I developed this quick function which prepends the line number to the beginning of each line. The line numbers are left justified and formatted with a 1 character white space on either side of the number.
There are two methods of operation. The first prepends the line numbers to each line and is activated with :Printwln (or ":Printwln(0)" ). The second method of calling causes the program to prepend the line number and then go on to print the file using ":hardcopy", and then undo the changes it just made. This allows you to print off the contents of a file without changing it.
Hope it helps someone.
|Place where appropriate, source printwln.vim|
Click on the package to download.
ip used for rating: 126.96.36.199