Re: [wishlist] Printing part of a file & changing printer from print dialog
Cream is a free, easy-to-use configuration of the Vim text editor
Brought to you by:
digitect
|
From: Steve H. <dig...@mi...> - 2006-03-06 22:27:25
|
From: BG - Ben Armstrong, Mar 6, 2006 1:48 PM
>
> A couple of wishlists from Peter:
>
> On Thu, 2006-03-02 at 12:46 -0400, PM - Peter Mason wrote:
> >
> > Would please pass the suggestion that it would be great if:
> > - if text highlighted the print dialog included an option to print
> > only the selected text
Good way to save paper, replace the same function in cream-print.vim
with:
function! Cream_print(mode)
" print and provides option dialog where plausible
call Cream_print_init()
if Cream_print_dialog() == -1
return
endif
if a:mode == "v"
let n = confirm(
\ "Print selection or document?\n" .
\ "\n", "&Selection\n&Document\n&Cancel", 1, "Info")
if n == 1
normal gv
let firstline = line("'<")
let lastline = line("'>")
execute ":" . firstline . "," . lastline . "hardcopy"
elseif n == 2
hardcopy
else
return
endif
else
hardcopy
endif
endfunction
> > - A related suggestion is that it would be also great if the print
> > dialog box included an option to change from the default printer
If you are refering to the Windows printer dialog box, this option is
taken from the Windows default.
--
Steve Hall [ digitect mindspring com ]
:: Cream... something good to put in your Vim!
:: http://cream.sourceforge.net
|