How do you type a vim buffer through lpr?

I want to print a buffer, and I do it like this:

:%!lpr 

Which works, but it deletes the buffer, and I need to restore it with u . Is there a better way to print a buffer (or a range of lines in it)?

+4
source share
1 answer
 :%w !lpr 

or, using the built-in print command,

 :hardcopy 
+15
source

Source: https://habr.com/ru/post/1334097/


All Articles