[EMAIL PROTECTED] wrote:
Robert Cussons <[EMAIL PROTECTED]> wrote on 2006.07.21 19:19:56:
because this is the size I want my gvim window to be when it opens,
however as gvimdiff opens at least two buffers I would like it to open
full screen, is there a way of getting this to happen?
gvim 7 in windows part:
I also use gvim at home, but there I use gvim 7 on windows instead of
gvim 6.3 on debian. So I have a few questions:
How do I use gvimdiff in windows?
If I already have a gvim window open how do I launch a new separate
instance of gvim from inside the first window (without having to go to
the desktop and click the icon!)
Sorry this is more of a windows question than gvim: On my linux machine
running KDE I have Ctrl-Shift-G set up to launch gvim, is there a way to
set a keyboard shortcut in Windows XP to do the same?
Many thanks for any help,
Rob.
If you want to maximize the window in Windows, here is the way:
if has("gui_win32") " NT Windows
autocmd GUIEnter * :simalt ~x
endif
":simalt ~x" is language-dependent: the x is whatever hotkey activates
"Maximize" on the Control menu. In French is is ":simalt ~g" with the g
of "Agrandir".
The following (in your vimrc) will maximize gvim on all platforms and
leave console Vim untouched:
if has("gui_running")
set lines=9999 column=9999
endif
In some cases there may be a one-column and/or one-line difference with
clicking the Maximize button.
Note that it should be wrapped inside an autocmd group, if you don't have
any autocmd inside your .vimrc, here is the way:
augroup vimrcEx
autocmd!
" put your autocmd here.
augroup END
About diff mode: I use the following to test for diff mode, but I forget
why it works.
let in_diff_mode = 0
windo let in_diff_mode = in_diff_mode + &l:diff
if in_diff_mode == 1
" do something
else
" do something else
endif
About short-cut key for launch gvim? just create a shortcut on desktop or
start menu, then right click to change the properties, the short cut key
could be set there.
--
Sincerely, Pan, Shi Zhu. ext: 2606
For diff mode, you need an external "diff.exe" program in your PATH. If
you don't yet have a working one, I recommend the diff program from the
GnuWin32 project at sourceforge.net.
Once you have a working "diff" program, you can use
gvim -d file1 file2
to start in diff mode, or
:e file1
:vert diffsplit file2
to set diff mode after starting Vim, or else
:windo diffthis
to establish diff mode between all current windows.
To clear diff mode, use (e.g.) ":windo set nodiff".
See
:help -d
:help 'diff'
:help diff.txt
To start another insance of gvim from within the first one, use
:!gvim [options] [filename] ...
The new instance will "fork" away from its caller, which won't get hung.
Best regards,
Tony.