Why .swp can be generated?

20 views
Skip to first unread message

Peng Yu

unread,
May 5, 2015, 11:44:28 PM5/5/15
to vim_use
Hi, When I open a file, a file like .somefile.swp will be generated.
But why a file .swp (without the filename) can be generated?

--
Regards,
Peng

Nikolay Pavlov

unread,
May 6, 2015, 1:12:18 AM5/6/15
to vim...@googlegroups.com
2015-05-06 6:44 GMT+03:00 Peng Yu <peng...@gmail.com>:
> Hi, When I open a file, a file like .somefile.swp will be generated.
> But why a file .swp (without the filename) can be generated?

Extension is the part of the filename. File `.swp` does have the filename.

This can be generated when you view a directory.

>
> --
> Regards,
> Peng
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Gary Johnson

unread,
May 6, 2015, 1:13:43 AM5/6/15
to vim_use
On 2015-05-05, Peng Yu wrote:
> Hi, When I open a file, a file like .somefile.swp will be generated.
> But why a file .swp (without the filename) can be generated?

You will get a file named .swp if you open a new unnamed buffer and
enter text into it. For example, start Vim as

$ vim

and add some text,

ahello

Regards,
Gary

Reply all
Reply to author
Forward
0 new messages