vim editor

in vim editor, if i want to save that file, i have to save and exit (ZZ). i want to be able to save the file without exiting. that way, i can compile the code and if i need to change some coding, i can just switch over without retyping "vim myprogram.c". is there a way to save without exit?
thanks

The command:
:w
will write the file out but leave you editing it.

but that will still leave in the edit mode. what if i want to keep the shell prompt open so i can compile and edit (switching back and forth between windows). i think it has something to do with the & command. i did "vim myprogram.c &" and it gave me back the shell prompt. i'm assuming vim myprogram.c is running in the background. how do i access it?
thanks.

try typing fg and the command prompt

hey yeah...it did bring vim editor back out. but how do i switch back to the command prompt? what i'm really interest in is the ability to switch back and forth between vim editor and command prompt. is there a way to do that?
thanks

In vim, in command mode (after hitting [esc]), type Ctrl-Z. It will background vim and put the shell in the foreground. To get back, type "fg". If you have multiple backgrounded processes, you will have to specify which job to foreground to make sure you get the right one.

Try "!" in command mode in vim. You can execute shell commands from vi mode, using the following syntax.

:!<shell cmd>

You can still remain in vi mode after executing the command.

Deepa

hey...that was totally cool. thanks alot