RE: How to maximize my vim window when I start it?

2007-02-07 Thread Gene Kwiecinski
>>off maximised, but it insisted on being a resizeable window.  Only
>>Tony's suggestion to try the 'simalt ~x' worked, but even so, I can
see
>>it starting out as a "window", then jiggling a bit then filling out to
>>fullsize.

>I didn't suggest it. What I suggested was
>if has("gui_running")
>   set guifont=
>   set lines=9 columns=9
>endif
>(which worked for me on W98 and on XP, and still does on Linux with
kde) in 
>the vimrc. Someone else suggested ":simalt ~x" which works provided
that, in 
>your locale, the shortcut for "Maximize" in the Alt-Space menu is "x".
In a 
>French version of Windows it would be ":simalt ~g" for instance.

Okay, I just assumed you suggested it, being so chock full o' helpful
hints.  :D  Might've been Tim, then.

Either way, it worked, and I'm happy.


Re: How to maximize my vim window when I start it?

2007-02-06 Thread A.J.Mechelynck

Gene Kwiecinski wrote:

1. How to setup my gvim to open to the maximal size when I start it?



How do you open gvim?  If you start by clicking the icon, you may
right click the icon and find an option regarding the size when
starting in property (I'm not using win XP now so I'm not sure about
the exact option).


I had a similar problem for a long time.  On this machine here, for some
reason, I got it to start out maximised right off (luck?), but
ironically, on my 98SE laptop, I can't do *anything* to get it to start
off maximised.  I tried the icon in the traybar-thingy, in the "Start"
menu, anyplace/everyplace I could find it, set the properties to start
off maximised, but it insisted on being a resizeable window.  Only
Tony's suggestion to try the 'simalt ~x' worked, but even so, I can see
it starting out as a "window", then jiggling a bit then filling out to
fullsize.

Point being, the simalt thing worked for me.  Not quite as I wanted it
to (ie, to start out maximised, not resize after loading up), but it
still works.




I didn't suggest it. What I suggested was

if has("gui_running")
set guifont=
set lines=9 columns=9
endif

(which worked for me on W98 and on XP, and still does on Linux with kde) in 
the vimrc. Someone else suggested ":simalt ~x" which works provided that, in 
your locale, the shortcut for "Maximize" in the Alt-Space menu is "x". In a 
French version of Windows it would be ":simalt ~g" for instance.


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
17. You turn on your intercom when leaving the room so you can hear if new
e-mail arrives.


Re: How to maximize my vim window when I start it?

2007-02-06 Thread A.J.Mechelynck

John Doe wrote:

I am using the gentoo distro, which has gvim 7.0.17 with some gentoo
patches applied. You did not tell, whether you tried the 'set lines=999
columns=999' twice in a row. Anyway, the plain setting does not work for
 me at all in .vimrc even though it does work after some delay, after
gvim has loaded. Setting lines and columns to a large number twice
always produces the strange effects I was writing about.




Once I did, the other time I din't; in both cases I saw the strange results.

Of course the line "set lines=9 columns=9" is present only once in my 
vimrc; /that/ doesn't give me any strange behaviour.


See also what I said (to someone on Xubuntu) in the thread "html post" which 
ought to have been started inside this thread.


I forgot to attach the ":version" listing of my two versions of Vim. Here they 
are:





VIM - Vi IMproved 7.0 (2006 May 7, compiled Feb  4 2007 03:42:30)
Included patches: 1-191
Compiled by [EMAIL PROTECTED]
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+cryptv
 +cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic 
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path 
+folding -footer
+fork() +gettext -hangul_input +iconv +insert_expand +jumplist +keymap 
+langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession 
+modify_fname
 +mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm 
+mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype 
+path_extra
+perl +postscript +printer +profile +python +quickfix +reltime +rightleft 
+ruby +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax
+tag_binary +tag_old_static -tag_any_white +tcl +terminfo +termresponse 
+textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual 
+visualextra
+viminfo +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset 
+xim +xsmp_interact +xterm_clipboard -xterm_save

   system vimrc file: "$VIM/vimrc"
 user vimrc file: "$HOME/.vimrc"
  user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
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  -DXTHREADS 
-D_REENTRANT -DXUSE_MTSAFE_API -I/opt/gnome/include/gtk-2.0 
-I/opt/gnome/lib/gtk-2.0/include -I/usr/X11R6/include 
-I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 
-I/usr/include/freetype2 -I/usr/include/freetype2/config 
-I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include   -DORBIT2=1 
-pthread -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/libart-2.0 
-I/usr/include/libxml2 -I/opt/gnome/include/libgnomeui-2.0 
-I/opt/gnome/include/libgnome-2.0 -I/opt/gnome/include/libgnomecanvas-2.0 
-I/opt/gnome/include/gtk-2.0 -I/opt/gnome/include/gconf/2 
-I/opt/gnome/include/libbonoboui-2.0 -I/opt/gnome/include/glib-2.0 
-I/opt/gnome/lib/glib-2.0/include -I/opt/gnome/include/orbit-2.0 
-I/opt/gnome/include/libbonobo-2.0 -I/opt/gnome/include/gnome-vfs-2.0 
-I/opt/gnome/lib/gnome-vfs-2.0/include 
-I/opt/gnome/include/bonobo-activation-2.0 -I/opt/gnome/include/pango-1.0 
-I/usr/include/freetype2 -I/opt/gnome/lib/gtk-2.0/include -I/usr/X11R6/include 
-I/opt/gnome/include/atk-1.0 -I/usr/include/freetype2/config -O2 
-fno-strength-reduce -Wall  -I/usr/X11R6/include   -D_REENTRANT -D_GNU_SOURCE 
-DTHREADS_HAVE_PIDS -DDEBUGGING  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-I/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE  -I/usr/include/python2.4 
-pthread -I/usr/include  -D_LARGEFILE64_SOURCE=1  -I/usr/lib/ruby/1.8/i686-linux
Linking: gcc -L/opt/gnome/lib   -L/usr/X11R6/lib   -rdynamic  -Wl,-E 
-Wl,-rpath,/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE  -rdynamic 
-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE 
-L/usr/local/lib -o vim   -L/opt/gnome/lib -lgtk-x11-2.0 -lgdk-x11-2.0 
-latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 
-lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -L/opt/gnome/lib -L/usr/X11R6/lib 
-lgnomeui-2 -lbonoboui-2 -lxml2 -lz -lgnomecanvas-2 -lgnome-2 -lpopt 
-lart_lgpl_2 -lpangoft2-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 
-lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 
-lgnomevfs-2 -lbonobo-2 -lgconf-2 -lbonobo-activation -lORBit-2 -lgmodule-2.0 
-lgthread-2.0 -lglib-2.0   -lXt -lncurses -lacl -lgpm -Wl,-E 
-Wl,-rpath,/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE 
/usr/lib/perl5/5.8.6/i586-linux-thread-multi/auto/DynaLoader/DynaLoader.a 
-L/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE -lperl -lutil -lc 
-L/usr/lib/python2.4/config -lpython2.4 -lutil -Xlinker -export-dynamic 
-L/usr/lib -ltcl8.4 -lieee -lruby -lm





VIM - Vi IMproved 6.2 (2003 Jun

RE: How to maximize my vim window when I start it?

2007-02-06 Thread Gene Kwiecinski
>>1. How to setup my gvim to open to the maximal size when I start it?

>How do you open gvim?  If you start by clicking the icon, you may
>right click the icon and find an option regarding the size when
>starting in property (I'm not using win XP now so I'm not sure about
>the exact option).

I had a similar problem for a long time.  On this machine here, for some
reason, I got it to start out maximised right off (luck?), but
ironically, on my 98SE laptop, I can't do *anything* to get it to start
off maximised.  I tried the icon in the traybar-thingy, in the "Start"
menu, anyplace/everyplace I could find it, set the properties to start
off maximised, but it insisted on being a resizeable window.  Only
Tony's suggestion to try the 'simalt ~x' worked, but even so, I can see
it starting out as a "window", then jiggling a bit then filling out to
fullsize.

Point being, the simalt thing worked for me.  Not quite as I wanted it
to (ie, to start out maximised, not resize after loading up), but it
still works.


Re: How to maximize my vim window when I start it?

2007-02-06 Thread John Doe
I am using the gentoo distro, which has gvim 7.0.17 with some gentoo
patches applied. You did not tell, whether you tried the 'set lines=999
columns=999' twice in a row. Anyway, the plain setting does not work for
 me at all in .vimrc even though it does work after some delay, after
gvim has loaded. Setting lines and columns to a large number twice
always produces the strange effects I was writing about.



Re: How to maximize my vim window when I start it?

2007-02-06 Thread A.J.Mechelynck

John Doe wrote:

I don't know if I am in error, but ':set lines=999 columns=999' from
.vimrc does not work for me under KDE 3.5. It works in ex mode, after
everything is loaded, but not from the .vimrc file (and yes I am using
gvim). There are also some notable strange effects:

au GUIEnter * set lines=999 columns=999

seems to really make gvim think there are so many columns and lines:
word-wrap is turned off and command line disappears, but it resizes the
gvim's window ok.

the only thing that works for me is:

au CursorHold * exe ':set lines=999 columns=999 | au! CursorHold', which
does the resizing after a delay, but sometimes even this produces the
aforementioned strange effect.

In short, under KDE, :set lines=999 columns=999 works for me after
everything "settles down", but not before. I am using gvim 7.0.17.



I'm using gvim under kde too (currently gvim 7.0.191; "rpm -qa |grep kde" 
outputs a lot of things, among which "kdebase3-SuSE-9.3-39.7" and 
"kdebase3-devel-3.4.0-28"); my vimrc includes


set nocompatible
[...]
runtime vimrc_example.vim
[...]
if has("gui_running")
if has("gui_gtk2")
set gfn=SUSE\ Sans\ Mono\ 9
elseif has("gui_kde")
set gfn=SUSE\ Sans\ Mono/9/-1/5/50/0/0/0/1/0
elseif has("x11")
set gfn=-*-lucidatypewriter-medium-r-normal-*-*-100-*-*-m-*-*
else
set gfn=Lucida_Console:h10:cDEFAULT
endif
[...]
set lines=9 columns=9
[...]
endif
[...]

where the [...] represent omitted sections.

gvim always starts maximized. Also (the rare times when I use it) kvim 6.2.14 
(a version of gvim 6.2.14 with kde patches to use Qt rather than GTK, Motif, 
etc.).


Best regards,
Tony.
--
"I argue very well.  Ask any of my remaining friends.  I can win an
argument on any topic, against any opponent.  People know this, and
steer clear of me at parties.  Often, as a sign of their great respect,
they don't even invite me."
-- Dave Barry


Re: How to maximize my vim window when I start it?

2007-02-06 Thread Manu Hack

On 2/4/07, Jiang Ting <[EMAIL PROTECTED]> wrote:


1. How to setup my gvim to open to the maximal size when I start it?


How do you open gvim?  If you start by clicking the icon, you may
right click the icon and find an option regarding the size when
starting in property (I'm not using win XP now so I'm not sure about
the exact option).


Re: How to maximize my vim window when I start it?

2007-02-05 Thread John Doe
I don't know if I am in error, but ':set lines=999 columns=999' from
.vimrc does not work for me under KDE 3.5. It works in ex mode, after
everything is loaded, but not from the .vimrc file (and yes I am using
gvim). There are also some notable strange effects:

au GUIEnter * set lines=999 columns=999

seems to really make gvim think there are so many columns and lines:
word-wrap is turned off and command line disappears, but it resizes the
gvim's window ok.

the only thing that works for me is:

au CursorHold * exe ':set lines=999 columns=999 | au! CursorHold', which
does the resizing after a delay, but sometimes even this produces the
aforementioned strange effect.

In short, under KDE, :set lines=999 columns=999 works for me after
everything "settles down", but not before. I am using gvim 7.0.17.


Re: How to maximize my vim window when I start it?

2007-02-05 Thread Theerasak Photha

On 2/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hi,

The :set lines=9 columns=9 does not really maxmize the Vim window.
Since there's still borders for the window, a maximized window have no
borders (AFAIK this is true for WinXP and KDE).

Since you are highly unlikely to use a Windows version other than English
and Chinese. The following method works:

if has("gui_win32")   " NT Windows
autocmd GUIEnter * :simalt ~x
endif

Tony think the method is non-portable, that is true, if there's a portable
way to do the job, I will prefer the portable way. However, the :set
lines=9 columns=9 cannot do the same job as the :simalt can do, so
their must be a compromize. I would recommend the ":simalt" way until there
is a nature way for vim to cope with that.


There's a third (although not exactly desirable) way. If you use vim
sessions, you can add 'resize' to the set of sessionoptions, and set
columns and lines to values that are useful for a significant length
of time. This way, they will persist across sessions.

I use this method under the ratpoison window manager in Linux and it
works quite well.


Re: How to maximize my vim window when I start it?

2007-02-05 Thread Christian Ebert
* Jiang Ting on Sunday, February 04, 2007 at 17:26:38 -0600:
> 2. I am using latex-suite; I want to setup macros like:
> (1). `o=\theta;
> (2). call IMAP('kk','\[<++>\]<++>','tex');

Did you put them in eg. ~/.vim/ftplugin/tex.vim ?

c
-- 
_B A U S T E L L E N_ lesen! --->> 


Re: How to maximize my vim window when I start it?

2007-02-04 Thread A.J.Mechelynck

[EMAIL PROTECTED] wrote:

Hi,

The :set lines=9 columns=9 does not really maxmize the Vim window.
Since there's still borders for the window, a maximized window have no
borders (AFAIK this is true for WinXP and KDE).

Since you are highly unlikely to use a Windows version other than English
and Chinese. The following method works:

if has("gui_win32")   " NT Windows
autocmd GUIEnter * :simalt ~x
endif

Tony think the method is non-portable, that is true, if there's a portable
way to do the job, I will prefer the portable way. However, the :set
lines=9 columns=9 cannot do the same job as the :simalt can do, so
their must be a compromize. I would recommend the ":simalt" way until there
is a nature way for vim to cope with that.



":set lines=9 columns=9" expands the Vim screen to within 
approximately one character cell of the maximum. The full-screen size is 
usually not a multiple of the character cell so whatever method you use (even 
":simalt" there has to be an unused "fraction" of a cell's height and width 
around the borders. With my usual settings in kde (1024x768 display with 
two-row taskbar at bottom, gvim with GTK2 GUI, menu, toolbar and text-style 
tab bar displayed, 'guifont' set to "SUSE Sans Mono 9"), there may be a one- 
or two-pixel empty space around my Vim screen but I don't notice it; the most 
noticeable thing is that the "maximize/unmaximize" button shows a single 
rectangle rather than two overlapping ones.


Actually I tried clicking that button and the result is surprising: clicking 
it repeatedly cycles between _three_ states: maximized with the button showing 
one rectangle, maximized (same size) with button showing two overlapping 
rectangles, and not maximized (about 50% width and 75% height).


":simalt ~x" relies on Alt-Space x being the menu shortcut key to maximize. In 
a French version of Windows (as the one I used to have) it would be ":simalt 
~g" instead because the French version of Windows uses the g of Agrandir 
(rather than the x of Maximize) as the shortcut. Similarly for other languages 
and OSes. (The help for ":simalt" says {only for Win32 versions}; however I'm 
not on Windows and exists(":simalt") returns 2. Apparently that help page is 
outdated.)



Best regards,
Tony.


Re: How to maximize my vim window when I start it?

2007-02-04 Thread panshizhu
Hi,

The :set lines=9 columns=9 does not really maxmize the Vim window.
Since there's still borders for the window, a maximized window have no
borders (AFAIK this is true for WinXP and KDE).

Since you are highly unlikely to use a Windows version other than English
and Chinese. The following method works:

if has("gui_win32")   " NT Windows
autocmd GUIEnter * :simalt ~x
endif

Tony think the method is non-portable, that is true, if there's a portable
way to do the job, I will prefer the portable way. However, the :set
lines=9 columns=9 cannot do the same job as the :simalt can do, so
their must be a compromize. I would recommend the ":simalt" way until there
is a nature way for vim to cope with that.

--
Sincerely, Pan, Shi Zhu. ext: 2606


[EMAIL PROTECTED] wrote on 2007-02-05 07:26:38:

> Hi, everyone:
> I am now using gvim7.0 on WIN XP; I have several questions:
>
> 1. How to setup my gvim to open to the maximal size when I start it?
>



Re: How to maximize my vim window when I start it?

2007-02-04 Thread A.J.Mechelynck

Jiang Ting wrote:

Hi, everyone:

Thanks for the welcome. ^_^
Last week I emailed vim@vim.org from Outlook, but the server returned
all my email. Yesterday I tried to send email from my gmail account
directly, now it works.

I am now using gvim7.0 on WIN XP; I have several questions:

1. How to setup my gvim to open to the maximal size when I start it?


add to your vimrc the following 3 lines:

if has("gui_running")
set lines=9 columns=9
endif

Or, if you have a gvimrc, you can add

set lines=9 columns=9

to it. gvim will never use an actual size larger than what fits onscreen, so 
using a huge value effectively maximizes the screen. (In some cases there may 
be a one-character-cell rounding error.)


Another possibility would be to trigger the Alt-space menu (see ":help 
:simalt") but the command to use varies according to your locale and possibly 
your OS, so I don't recommend it.




2. I am using latex-suite; I want to setup macros like:
(1). `o=\theta;
(2). call IMAP('kk','\[<++>\]<++>','tex');

for (2), now I have to setup them every time when I use latex-suite;
how can I make them as default?


don't know



3. I am also writting Fortran 90 codes this semester and I want to
write like hw1.f90 and hw1.txt simultaneously; hw1.f90 for running,
hw1.txt for me to submit a hard copy to my Prof. How can I write the
same content in two files at the same time?


There are several possibilities:
- submit a hard copy on paper by using the ":hardcopy" command (q.v.) with the 
.f90 file

- copy the file with e.g. ":w %:r.txt" (without the quotes).
- set up an autocommand to do the above automatically, e.g.:

:au BufWritePost *.f90 w %:r.txt

(untested)


4. If I use:   :r !command, vim will include all the results given by
the shell command after where the index stay; Can I use:  :r command
to include the vim command?


not sure if I understand what you're asking for.
To capture the output of one or more Vim command(s), see ":help :redir".



5. :n,mw !command will take from the nth line to mth line as the shell 
command.

Can I use:  :n,mw command to do the same thing for vim command?


not sure if I understand.
- Every ex-command which can use a range (as shown in the help for that 
command) will accept (for instance) 5,10 between the : and the command name to 
act on lines 5 to 10. For instance :.,$s/\_s\+/\r/g will apply the substitute 
on all lines from the current line (.) to the end of the file ($), in this 
case breaking lines at any whitespace.

- Typing just :1234 (then Enter) will move the cursor to line 1234.
See ":help [range]" for details.



Hopfully I made all my questions clear. Thanks a lot.

Ting




Best regards,
Tony.


How to maximize my vim window when I start it?

2007-02-04 Thread Jiang Ting

Hi, everyone:

Thanks for the welcome. ^_^
Last week I emailed vim@vim.org from Outlook, but the server returned
all my email. Yesterday I tried to send email from my gmail account
directly, now it works.

I am now using gvim7.0 on WIN XP; I have several questions:

1. How to setup my gvim to open to the maximal size when I start it?

2. I am using latex-suite; I want to setup macros like:
(1). `o=\theta;
(2). call IMAP('kk','\[<++>\]<++>','tex');

for (2), now I have to setup them every time when I use latex-suite;
how can I make them as default?

3. I am also writting Fortran 90 codes this semester and I want to
write like hw1.f90 and hw1.txt simultaneously; hw1.f90 for running,
hw1.txt for me to submit a hard copy to my Prof. How can I write the
same content in two files at the same time?

4. If I use:   :r !command, vim will include all the results given by
the shell command after where the index stay; Can I use:  :r command
to include the vim command?

5. :n,mw !command will take from the nth line to mth line as the shell command.
Can I use:  :n,mw command to do the same thing for vim command?

Hopfully I made all my questions clear. Thanks a lot.

Ting