Jiang Ting wrote:
Hi, everyone:
Thanks for the welcome. ^_^
Last week I emailed [email protected] 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=99999 columns=99999
endif
Or, if you have a gvimrc, you can add
set lines=99999 columns=99999
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.