File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
- *print.txt* For Vim version 9.0. Last change: 2022 Jan 23
1
+ *print.txt* For Vim version 9.0. Last change: 2022 Oct 01
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -158,13 +158,16 @@ currently specified printdevice: >
158
158
If you change this option, using a function is an easy way to avoid having to
159
159
escape all the spaces. Example: >
160
160
161
- :set printexpr=PrintFile(v:fname_in )
162
- :function PrintFile(fname )
163
- : call system("ghostview " .. a:fname )
164
- : call delete(a:fname )
161
+ :set printexpr=PrintFile()
162
+ :function PrintFile()
163
+ : call system("ghostview " .. v:fname_in )
164
+ : call delete(v:fname_in )
165
165
: return v:shell_error
166
166
:endfunc
167
167
168
+ It is more efficient if the option is set to just a function call,
169
+ see | expr-option-function | .
170
+
168
171
Be aware that some print programs return control before they have read the
169
172
file. If you delete the file too soon it will not be printed. These programs
170
173
usually offer an option to have them remove the file when printing is done.
You can’t perform that action at this time.
0 commit comments