On Nov 5, 10:39 am, <[email protected]> wrote:
> The printer icon in the toolbar is right next to the save button and I often 
> print by mistake when trying to save.
> Since printing is one of the least-used functions it would be good to have it 
> on the right-hand edge.
> Is there a way to move theseicons?
> Keith

I spent a bit of time looking at this but it gets quite complicated
and I had
to move on to other things.  For what it's worth here's what I found,
perhaps
someone else knows how to do it properly.  I'm using Windows
GVim 7.3 patches 1-2.

Toolbar is configured in $VIMRUNTIME/menu.vim

The hacky way to do what you want is to find these lines in that file
and
change the parameter from "an 1.40" to "an 10", then restart gvim:

" The GUI toolbar (for MS-Windows and GTK)

(a few lines below...)

  if has("printer")
    an 1.40   ToolBar.Print             :hardcopy<CR>
    vunmenu   ToolBar.Print
    vnoremenu ToolBar.Print             :hardcopy<CR>
  elseif has("unix")
    an 1.40   ToolBar.Print             :w !lpr<CR>
    vunmenu   ToolBar.Print
    vnoremenu ToolBar.Print             :hardcopy<CR>
  endif

This is a bad idea since menu.vim may get replaced whenever a new
version of
vim is installed.  It would be better to have some custom commands in
your own
_gvimrc file to re-configure the print button.

:help gui-toolbar

On that page there are various commands available for modifying menus
in
place.  I tried adding this to my _gvimrc, the unmenu command works by
itself
in that the button disables (but doesn't disappear) but the other
commands
re-enable the button and do not move it:

unmenu ToolBar.Print
if has("printer")
  an 10   ToolBar.Print         :hardcopy<CR>
  vunmenu   ToolBar.Print
  vnoremenu ToolBar.Print               :hardcopy<CR>
elseif has("unix")
  an 10   ToolBar.Print         :w !lpr<CR>
  vunmenu   ToolBar.Print
  vnoremenu ToolBar.Print               :w !lpr<CR>
endif

I don't understand why this doesn't work because at this point I had
to give up.

regards,
Geoff

-- 
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

Reply via email to