-
Notifications
You must be signed in to change notification settings - Fork 0
Prepend line numbers to each line for printing
vim-scripts/PrintWithLNum
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a mirror of http://www.vim.org/scripts/script.php?script_id=277 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. Colin.
About
Prepend line numbers to each line for printing
Resources
Stars
Watchers
Forks
Packages 0
No packages published