How can you print a file while you are in the vi editor?

1 answer

Answer

1287109

2026-07-21 03:00

+ Follow

To print a file while in the vi editor, you can use the command :!lpr. This command sends the current buffer to the default printer. Alternatively, if you want to specify options for the print command, you can use something like :!lpr -P printer_name to print to a specific printer. After executing the command, you will return to the vi editor.

ReportLike(0)ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.