Is there a way in VIM to quit editing the current file and leave
the editor OPEN? When I edit a single file, and then exit it
with :q, VIM exits. Is this a VI specific "feature"?
Thanks in advance,
Jim
--
*------------------* (o o) *-------------------------*
|Jim Vober \---ooO-(_)-Ooo---\ jmv...@ra.rockwell.com|
|Rockwell Automation \ \ Phone: (440) 646-3702 |
|Allen-Bradley Co. \ KC8DZH \ Fax#: (440) 646-3993 |
|Information Networks \-----------------\ |
*-----------------------* *--------------------*
>Is there a way in VIM to quit editing the current file and leave
>the editor OPEN? When I edit a single file, and then exit it
>with :q, VIM exits. Is this a VI specific "feature"?
Just edit a different file.
When you start up vi/vim without filename, it generates a temporary
file anyway.
--
Matthias K. Buelow * Boycott Micro$oft, see http://www.vcnet.com/bms/ *
:e new_file
if you just go:
:e
it will be the same as doing:
:e %
cheers, Angus.
James M. Vober wrote:
>
> Hello,
>
> Is there a way in VIM to quit editing the current file and leave
> the editor OPEN? When I edit a single file, and then exit it
> with :q, VIM exits. Is this a VI specific "feature"?
>
> Thanks in advance,
> Is there a way in VIM to quit editing the current file and leave
> the editor OPEN? When I edit a single file, and then exit it
> with :q, VIM exits. Is this a VI specific "feature"?
In vim you cab just delete the buffer. Might sound cryptic at first,
but there is a difference between quitting and deleting the buffer.
Try :bd instead of :q
The docs have the following to say:
:[N]bd[elete] *:bd* *:bdel* *:bdelete*
:bd[elete] [N]
Unload buffer [N] (default: current buffer) and delete it from
the buffer list. If the buffer was changed, this fails. The
file remains unaffected. Any windows for this buffer are
closed. If buffer [N] is the current buffer, the next buffer
(displayed in a window) becomes the current buffer.
Peppe
--
Preben Guldberg __/-\__ The woods are lovely, dark and deep
c92...@student.dtu.dk (o o) But I have promises to keep
----------------------oOOo (_) oOOo-- And miles to go before I sleep.
http://www.student.dtu.dk/~c928400 --Robert Frost
>Is there a way in VIM to quit editing the current file and leave
>the editor OPEN? When I edit a single file, and then exit it
>with :q, VIM exits.
The :bd (buffer delete) command will abondon the current buffer
without exiting the editor. There are also a number of other ways of
handling this, depending upon the exact effect you want. I suggest
you read through the online help on windows and buffers
(":help vim_win" in Vim 4.x or ":help buffers" in Vim 5.0) for more
information.