Getting Gvim print button to print in landscape mode

80 views
Skip to first unread message

Eric Marceau

unread,
Feb 28, 2025, 5:12:14 PMFeb 28
to vim...@googlegroups.com

Hello,

I've tried to set my vimrc parameters for landscape mode.  Here is what I have in my file:

"###
"######    Hardcopy Options
"######   See:   https://vimdoc.sourceforge.net/htmldoc/print.html#print-options
"######   See:   https://vimdoc.sourceforge.net/htmldoc/options.html#'statusline'  for header format
"###

"###    Specify font for printout
"set printmbcharset="default"
"set printoptions="paper:letter,portrait:n,duplex:off,left:5pc,right:5pc,top:5pc,bottom:5pc,syntax:n,wrap:y"
"set printoptions="portrait:n,duplex:off,wrap:y,syntax:n"
"set printoptions="portrait:n,numbers:y,wrap:y,syntax:n,left:5pc,right:5pc,top:5pc,bottom:5pc"
"set printoptions="portrait:n,numbers:y,wrap:y,syntax:y"
set printoptions="portrait:n"
"set printfont="Courier:h15"
set printfont="SourceSans:h15"
"#set printheader="%t%=%{strftime('%c')}%=Page %N"
set printheader="%<%f%=Page %N"

The line in bold is, in my view, set to force landscape, but that never happens.  As you can see, I tried many variations before eliminating everything, but the orientation for the printoptions variable.

Can someone tell me

  • why not getting what I want with what is currently in the vimrc?
  • what I need to change to make a vimrc-specified setting control the print format to give me what I want?


Thank you.


$ vim --version

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 03 2025 11:54:38)
Included patches: 1-16, 647, 17-579, 1969, 580-647, 678, 648-1848, 4975, 5016, 5023, 5072, 2068, 1849-1854, 1857, 1855-1857, 1331, 1858, 1858-1859, 1873, 1860-1969, 1992, 1970-1992, 2010, 1993-2068, 2106, 2069-2106, 2108, 2107-2109, 2109-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919, 213, 1840, 1846-1847, 2110-2112, 2121
Modified by team...@tracker.debian.org
Compiled by team...@tracker.debian.org
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       +tcl
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
+balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
+browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     +perl              +title
+channel           +ipv6              +persistent_undo   +toolbar
+cindent           +job               +popupwin          +user_commands
+clientserver      +jumplist          +postscript        +vartabs
+clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3           +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          +ruby              +wildignore
+cursorbind        +lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con_gui    +mksession         +smartindent       +writebackup
+diff              +modify_fname      +sodium            +X11
+digraphs          +mouse             +sound             -xfontset
+dnd               +mouseshape        +spell             +xim
-ebcdic            +mouse_dec         +startuptime       +xpm
+emacs_tags        +mouse_gpm         +statusline        +xsmp_interact
+eval              -mouse_jsbterm     -sun_workshop      +xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary        
-farsi             -mouse_sysmouse    -tag_old_static    
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -g -O2 -ffile-prefix-map=/build/vim-q7BeVl/vim-8.2.3995=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lselinux -lcanberra -lsodium -lacl -lattr -lgpm -L/usr/lib -llua5.2 -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.34/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python3.10/config-3.10-x86_64-linux-gnu -lpython3.10 -lcrypt -ldl -lm -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm -lruby-3.0 -lm -L/usr/lib

$

Roy Fulbright

unread,
Feb 28, 2025, 10:52:36 PMFeb 28
to vim...@googlegroups.com
I tried it and unfortunately get the same results. It always prints in portrait mode regardless of the setting. The only way I can get it to print in landscape is by using the print dialogue and selecting landscape there.

From: vim...@googlegroups.com <vim...@googlegroups.com> on behalf of Eric Marceau <eajma...@gmail.com>
Sent: Friday, February 28, 2025 5:11:25 PM
To: vim...@googlegroups.com <vim...@googlegroups.com>
Subject: Getting Gvim print button to print in landscape mode
 
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/2723495e-770e-4479-8a1b-83ed7682fe21%40gmail.com.

meine

unread,
Mar 1, 2025, 3:30:51 AMMar 1
to vim...@googlegroups.com
There seems a lot of misinterpretation of Vim, leading to confusion or
frustration:

Vim is designed as a *text editor* using the keyboard like in the
beginning of computing.

Repeatedly there are discussions on 'what the mouse', or like here 'what
the print'. IMHO/AFAIK Vim isn't designed for that. Vim isn't a 'word
processor' and do-it-all-tool like LiberOffice Write or MS Word. It
ain't. It might look and feel nerdy to use a console editor, but then
you also have to adapt to the nerd-way of using the software. You'll
discover that Vim is loaded with nifty features that makes the keyboard
way faster than the mouse!

Learn to use the keystrokes as intended. Use another piece of software
to do the layout and that kind of things, for example pandoc
(https://pandoc.org/). Your output on a printer or PDF will astonish! By
adding code for markdown (https://daringfireball.net/projects/markdown/)
or LaTeX, even a combination of both, printing can be steered towards
the wanted output.

Examples? Lines starting with 'pandoc' uses that software with a
(Vim-made) text as _text_ source. It might need some extra installation.
You can save these code snippits eg. in cheat
(https://github.com/cheat/cheat):

# Text file conversions, basic use
pandoc <input_file>.<ext> -o <output_file>.<ext>

# To use A4 papersize and 12pt font
pandoc -V papersize:a4 -V fontsize:12pt

# To use A4 paper with smaller margins
pandoc -V geometry:a4paper

# To use 'smart' quotes, en- and em- dashes, etc
pandoc -s

# Use an empty page layout, without pagenumbers etc
\pagestyle{empty}

# Insert an image, dimensions between {} are at choice
# a `\ ' after an image produces just the image without name
![Image title](image url or path/file){html style dimensions}

# Insert my signature in letters
![](/home/my-sigfile.jpg){width="9.597cm" height="4.538cm"}\

# Insert an extra blank line
# use two spaces and a nonbreaking space (about)
` \'

# Insert a link to another document or url
[The linking text goes here](the link or url goes here)

# Pre-press string to make a pdf from markdown
pandoc -s -V papersize:a4 -V fontsize:12pt <input_file>.md -o <output_file>.pdf

# To make a presentation
pandoc -t beamer source.md -o slides.pdf

# Styling the presentation
pandoc -t beamer source.md -V theme:Warsaw -o slides.pdf

# RTFM http://pandoc.org/MANUAL.html
# LaTeX Beamer themes http://www.deic.uab.es/~iblanes/beamer_gallery/

Happy Vimming!

//meine

Christian Brabandt

unread,
Mar 1, 2025, 11:37:03 AMMar 1
to vim...@googlegroups.com

On Fri, 28 Feb 2025, Eric Marceau wrote:

> I've tried to set my vimrc parameters for landscape mode. Here is what I have in my file:
>
> ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
> │ "### │
> │ "###### Hardcopy Options │
> │ "###### See: https://vimdoc.sourceforge.net/htmldoc/print.html#print-options
> │ "###### See: https://vimdoc.sourceforge.net/htmldoc/options.html#'statusline' for header format │

Note: vimdoc.sf.net is outdated, last updated for version 7.3.162.
Better use vimhelp.org

> │ "### │
> │ │
> │ "### Specify font for printout │
> │ "set printmbcharset="default" │
> │ "set printoptions="paper:letter,portrait:n,duplex:off,left:5pc,right:5pc,top:5pc,bottom:5pc,syntax:n,wrap:y" │
> │ "set printoptions="portrait:n,duplex:off,wrap:y,syntax:n" │
> │ "set printoptions="portrait:n,numbers:y,wrap:y,syntax:n,left:5pc,right:5pc,top:5pc,bottom:5pc" │
> │ "set printoptions="portrait:n,numbers:y,wrap:y,syntax:y" │
> │ set printoptions="portrait:n" │

Here you are not setting landscape mode.

> │ "set printfont="Courier:h15" │
> │ set printfont="SourceSans:h15" │
> │ "#set printheader="%t%=%{strftime('%c')}%=Page %N" │
> │ set printheader="%<%f%=Page %N" │
> └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
>
> The line in bold is, in my view, set to force landscape, but that never happens. As you can see, I tried many variations before eliminating everything, but the orientation for the printoptions variable.

Until v9.1.0907 Vim would always set "Portrait" in the generated
postscript file.

> VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 03 2025 11:54:38)

So I would suggest to update your Vim.

Thanks,
Chris
--
We are now enjoying total mutual interaction in an imaginary hot tub ...

Christian Brabandt

unread,
Mar 1, 2025, 11:46:21 AMMar 1
to vim...@googlegroups.com

On Sat, 01 Mar 2025, 'meine' via vim_use wrote:

> There seems a lot of misinterpretation of Vim, leading to confusion or
> frustration:

indeed.

> Vim is designed as a *text editor* using the keyboard like in the
> beginning of computing.

Au contraire. While one of the strength of Vim is to be used very
efficiently using keyboard on even bare minimum systems, we are not
constrained to do so and we do offer a graphical Vim with all bells and
whistles which means we are explicitly not designing it to avoid using a
mouse or a graphical user interface. In fact some things like resizing
windows are slightly more efficient if you are using the mouse.

So it is perfectly okay to use the mouse if you personally prefer this.
Or use the cursor keys. Or use 'printoptions', after all, that's what it
is for :)

Vim gives you the flexibility to use it how YOU prefer it. Yes it is not
a word processor, but within the given feature set, we don't want to
limit the user on how they want to use it. And that's why we give you
all the options to configure the editor to your liking.

Thanks,
Christian
--
Chinese saying: "He who speak with forked tongue, not need chopsticks."

Eric Marceau

unread,
Mar 1, 2025, 2:53:47 PMMar 1
to vim...@googlegroups.com

Thank you,Christian, for replying.


However, the reference provided gives no different response to what I already have configured:

So ... are you saying that was a bug? ... and that it is now fixed in the never version?

OR ... is that a bug in the documentation, and that there is NO such functionality?


Note that the URL

tries to take me to SourceForge, where it fails:


Also, attempting to use Filezilla to reach, both,

resulted in the same error:


Please note that my computer is operating under

  • UbuntuMATE Release 22.04.5 LTS (Jammy Jellyfish) 64-bit
  • Linux 6.8.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Sep 11 15:25:05 UTC 2 x86_64 x86_64 x86_64 GNU/Linux (4GB RAM)
  • MATE 1.26.0

Thank you,


Eric

Christian Brabandt

unread,
Mar 1, 2025, 3:13:12 PMMar 1
to vim...@googlegroups.com
Please don't send me private copies.


Am 2025-03-01 20:53, schrieb Eric Marceau:
> Thank you,Christian, for replying.
>
> However, the reference provided gives no different response to _what I
> already have configured_:


Your options included portrait, but I thought you wanted landscape?
>
>>
>
> So ... are you saying that was a bug? ... and that it is now fixed in
> the never version?


The bug was, that vim wouldn't set landscape orientation no matter what
you configured in printoptions in the generated postscript file.
>
> OR ... is that a bug in the documentation, and that there is NO such
> functionality?
>
> Note that the URL
>
> * http://www.vim.org/binaries.html

Where did you find that URL?

>
> tries to take me to SourceForge, where it fails:
>
>>
>
> Also, attempting to use Filezilla to reach, both,
>
> * ftp://ftp.vim.org/pub/vim/MIRRORS
> * ftp://ftp.vim.org/


The ftp mirror has been retired.


Thanks
Chris

Eric Marceau

unread,
Mar 1, 2025, 5:54:56 PMMar 1
to vim...@googlegroups.com
Retry with less "quoting" because email was rejected first time around ...


On 2025-03-01 15:12, Christian Brabandt wrote:
Your options included portrait, but I thought you wanted landscape?

As I pointed out in the snapshot of the documentation on the site that you sent me, it clearly states that

  • "portrait=n"  (please refer back to snapshot of that documentation page in my previous email)

is the specified method to tell Gvim that landscape mode is the desired print mode.


The bug was, that vim wouldn't set landscape orientation no matter what you configured in printoptions in the generated postscript file.

Since you questioned the "portrait=n" method, is there a new "landscape=y" method, or is there a different documentation page that I should be referring to instead of the "vimhelp.org" reference?


Where did you find that URL?

That is the URL on the documentation page at

under the heading "FROM A PACKAGE".


The ftp mirror has been retired.

Using the information obtained from

is the most recent version (v9.1.1163) uploaded to

a confirmed functional build?


Also, as a bit of feedback, since Unix is not exactly Linux, or vice-versa, if the code is usable for both environments, may I suggest modifying the references (in documentation) to "Unix/Linux" or "Unix (Linux)" to eliminate confusion for people who think too literally about such things?


Thank you for the above, and for your ongoing contributions to the Gvim project.

Eric

Alessandro Antonello

unread,
Mar 1, 2025, 6:33:33 PMMar 1
to vim...@googlegroups.com

I'm using Vim for about 15 years now. Some times Vim terminal, most of the time GUI Vim. In the past years I could configure it, build scripts, build plugins and install third party plugins. Today I have a complete development environment with some simple but powerful functions that fulfills me on any project with any language.
Besides that, it also fulfills me on writing e-mails and technical documents. Using Pandoc and Latex as external tools, gives Vim power beyond any word processor.
For me, it is really great to have Vim as my every day working tool. And not have to use the mouse for anything.

Best regards to all


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.

Eric Marceau

unread,
Mar 1, 2025, 9:38:39 PMMar 1
to vim...@googlegroups.com

I've compiled and installed the latest version of Gvim downloaded from GitHub (see below).

Regretfully, the problem persists!

So ... how does vimrc tell Gvim to print in landscape mode, since the documented method doesn't work?


Thank you,

Eric


$ gvim --version

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Mar  1 2025 18:09:54)
Included patches: 1-1163

Compiled by ericthered@OasisMega1
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       -tcl


+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
+balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
+browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers

+byte_offset       +insert_expand     -perl              +title


+channel           +ipv6              +persistent_undo   +toolbar
+cindent           +job               +popupwin          +user_commands
+clientserver      +jumplist          +postscript        +vartabs
+clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo

+cmdline_info      +libcall           -python3           +virtualedit


+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace

+cscope            +localmap          -ruby              +wildignore
+cursorbind        -lua               +scrollbind        +wildmenu


+cursorshape       +menu              +signs             +windows
+dialog_con_gui    +mksession         +smartindent       +writebackup

+diff              +modify_fname      -sodium            +X11
+digraphs          +mouse             -sound             +xattr
+dnd               +mouseshape        +spell             -xfontset
-ebcdic            +mouse_dec         +startuptime       +xim
+emacs_tags        -mouse_gpm         +statusline        +xpm
+eval              -mouse_jsbterm     -sun_workshop      +xsmp_interact
+ex_extra          +mouse_netterm     +syntax            +xterm_clipboard
+extra_search      +mouse_sgr         +tag_binary        -xterm_save


-farsi             -mouse_sysmouse    -tag_old_static    
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"

 3rd user vimrc file: "~/.config/vim/vimrc"


      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"

3rd user gvimrc file: "~/.config/vim/gvimrc"


       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"

  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lfontconfig -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lselinux


meine

unread,
Mar 2, 2025, 4:04:40 AMMar 2
to vim...@googlegroups.com
On Sat, Mar 01, 2025 at 05:46:07PM +0100, Christian Brabandt wrote:
>
> On Sat, 01 Mar 2025, 'meine' via vim_use wrote:
>
> > There seems a lot of misinterpretation of Vim, leading to confusion or
> > frustration:
>
> indeed.
>
> > Vim is designed as a *text editor* using the keyboard like in the
> > beginning of computing.
>
> Au contraire.

Thanks @Christian for pointing to the other features, and indeed that
Vim makes whatever type of use possible.

Might come from that I only use Vim the bare bone way -- even set my
whole computer to using vim keybinds as much as possible.

KR, Meine

Jürgen Krämer

unread,
Mar 3, 2025, 1:50:00 AMMar 3
to vim...@googlegroups.com


Christian Brabandt schrieb am 01.03.2025 um 17:36:
>
> On Fri, 28 Feb 2025, Eric Marceau wrote:
>> │ "### │
>> │ │
>> │ "### Specify font for printout │
>> │ "set printmbcharset="default" │
>> │ "set printoptions="paper:letter,portrait:n,duplex:off,left:5pc,right:5pc,top:5pc,bottom:5pc,syntax:n,wrap:y" │
>> │ "set printoptions="portrait:n,duplex:off,wrap:y,syntax:n" │
>> │ "set printoptions="portrait:n,numbers:y,wrap:y,syntax:n,left:5pc,right:5pc,top:5pc,bottom:5pc" │
>> │ "set printoptions="portrait:n,numbers:y,wrap:y,syntax:y" │
>> │ set printoptions="portrait:n" │
>
> Here you are not setting landscape mode.

the bigger problem with this line -- and all the other lines -- is that there are no values
assigned to the options. The parts on the right side of the equal sign are comments, not
strings. As a result all those "values" would clear the respective options.

Don't use double quotes around option values. And neither use single quote; they wouldn't
do what you'd expect either. String options don't need any quote symbol around their values.
And if you need to include a space in the option's value escape it with a backslash.

Regards,
Jürgen

--
~
~
~
:wq

Christian Brabandt

unread,
Mar 3, 2025, 2:21:09 AMMar 3
to vim...@googlegroups.com

On Sat, 01 Mar 2025, Eric Marceau wrote:

> On 2025-03-01 15:12, Christian Brabandt wrote:
>
> Your options included portrait, but I thought you wanted landscape?
>
> As I pointed out in the snapshot of the documentation on the site that you sent
> me, it clearly states that
>
> • "portrait=n"  (please refer back to snapshot of that documentation page in
> my previous email)
>
> is the specified method to tell Gvim that landscape mode is the desired print
> mode.

As mentioned in the other message by Jürgen, make sure not to quote
values when using :set

In any case, I'd suggest to generate a postscript file using :hardcopy
and then inspect that file using e.g. ghostscript.

> The bug was, that vim wouldn't set landscape orientation no matter what you
> configured in printoptions in the generated postscript file.
>
> Since you questioned the "portrait=n" method, is there a new "landscape=y"
> method, or is there a different documentation page that I should be referring
> to instead of the "vimhelp.org" reference?
>
>
> Where did you find that URL?
>
> That is the URL on the documentation page at
>
> • https://vimhelp.org/usr_90.txt.html#usr_90.txt
>
> under the heading "FROM A PACKAGE".

I updated this page, also https://www.vim.org/binaries.html now
correctly redirects to https://www.vim.org/download.php

>
> The ftp mirror has been retired.
>
> Using the information obtained from
>
> • https://github.com/vim/vim?tab=readme-ov-file
>
> is the most recent version (v9.1.1163) uploaded to
>
> • https://github.com/vim/vim/tags
>
> a confirmed functional build?

Yes correct.

Thanks.
Christian
--
If builders built buildings the way programmers wrote programs,
then the first woodpecker to come along would destroy civilization.

Eric Marceau

unread,
Mar 3, 2025, 8:48:06 PMMar 3
to vim...@googlegroups.com

Thank you, Jürgen!   


Your explanation about the quotes was very helpful.  Very grateful for that!  Your response demonstrates a model of interaction which others could emulate to arrive at solutions faster, with less forum "chaff"!

I now have it working as I desired, using:

  • set printoptions=paper:letter,portrait:n,duplex:off,number:y,syntax:y,wrap:y,left:2pc,right:2pc,top:2pc,bottom:2pc

I was sure I had seen examples with the quotes, and that is why I was using them.  Now, I know differently!


Eric

Eric Marceau

unread,
Mar 3, 2025, 8:50:23 PMMar 3
to vim...@googlegroups.com

Thank you, Christian.


I appreciate your willingness to volunteer a different approach, but in this instance I prefer the direct route.

For more complex situations, I might reconsider that approach.


Eric

Reply all
Reply to author
Forward
0 new messages