anhnmncb
gpg key: 44A31344
When editing a directory, the netrw plugin uses ":setlocal noswapfile",
so you don't need to do anything, the swapfile is already disabled on
that directory.
See, however, ":help g:netrw_use_noswf", which tells you how to _enable_
swapfiles for directory buffers.
Best regards,
Tony.
--
You cannot propel yourself forward by patting yourself on the back.
> On 24/11/08 04:52, anhnmncb wrote:
>> As title, and I don't think it's very useful when editing a directory.
>
> When editing a directory, the netrw plugin uses ":setlocal noswapfile",
> so you don't need to do anything, the swapfile is already disabled on
> that directory.
Why I still find that vim produces a _.swp file in dir that editing?
>
> See, however, ":help g:netrw_use_noswf", which tells you how to _enable_
> swapfiles for directory buffers.
>
>
> Best regards,
> Tony.
--
I don't -- while editing my home directory, "ls -l ~/.sw*" does list
four files, but the most recent of them dates from more than a month ago.
You might create a swapfile (with no filename in its name) when you edit
a [No Name] file; then that swapfile will remain if Vim crashes or gets
killed.
>> See, however, ":help g:netrw_use_noswf", which tells you how to _enable_
>> swapfiles for directory buffers.
>>
>>
>> Best regards,
>> Tony.
>
--
Procrastinators do it tomorrow.
> On 24/11/08 08:44, anhnmncb wrote:
>> Tony Mechelynck<antoine.m...@gmail.com> writes:
>>
>>> On 24/11/08 04:52, anhnmncb wrote:
>>>> As title, and I don't think it's very useful when editing a directory.
>>> When editing a directory, the netrw plugin uses ":setlocal noswapfile",
>>> so you don't need to do anything, the swapfile is already disabled on
>>> that directory.
>>
>> Why I still find that vim produces a _.swp file in dir that editing?
>
> I don't -- while editing my home directory, "ls -l ~/.sw*" does list
> four files, but the most recent of them dates from more than a month ago.
>
> You might create a swapfile (with no filename in its name) when you edit
> a [No Name] file; then that swapfile will remain if Vim crashes or gets
> killed.
Here generates _.swo and _.swp, I'm sure the dir hasn't these files
before I edit it.
btw. my gvim version is official 7.2 for windows.
Mine is 7.2.049 for Linux (compiled from official sources, official
patches 1-49, and one unofficial patch which is about floating point
functions), Huge version with GTK2/Gnome GUI, Perl, Python, Ruby and TCL
but not MzScheme, etc. etc. etc.
I suppose that the fact that mine generates .swp, .swo, etc., rather
than _.swp, _.swo, etc. for [No Name] files is due to the fact that I'm
on Linux and you're on Windows.
Are you sure you aren't currently editing a [No Name] buffer (possibly
as a hidden buffer, if you have 'hidden' set)? The ":ls!" command might
help you. Look for buffers with a (active) or h (hidden) left of their name.
Best regards,
Tony.
--
You know you have a small apartment when Rice Krispies echo.
-- S. Rickly Christian
You can find out what those swap files are by navigating to that
directory in cmd and doing
vim -r
to get a list (not all that helpful) or
vim -r _.swp
which will try to 'recover' the specific file, showing you what's in it.
If indeed it is a directory listing, something must be different or
broken with netrw or Vim on windows. If it's something else, well,
you'll find out what it is and can decide for yourself what to do.
An alternative to going via cmd is to navigate in Vim to the directory,
via :cd and then do
:recover _.swp
Ben.
well, at least it will tell you the name of the buffer to which this
swapfile applies.
>
> vim -r _.swp
>
> which will try to 'recover' the specific file, showing you what's in it.
> If indeed it is a directory listing, something must be different or
> broken with netrw or Vim on windows. If it's something else, well,
> you'll find out what it is and can decide for yourself what to do.
>
> An alternative to going via cmd is to navigate in Vim to the directory,
> via :cd and then do
>
> :recover _.swp
>
> Ben.
Best regards,
Tony.
--
Whatever became of eternal truth?
No. When you next see this situation, please do what Tony asked: Use :ls! to list
all buffers. It is extremely likely that you have a hidden "no name" buffer,
possibly left over as part of some startup issue.
John
Don't know. I guess doc is a directory and you might omit the trailing slash, but
that's not likely to achieve much.
Try ':scriptnames' on both systems and compare what scripts have actually run.
John
It means that if you have an open buffer it will get hidden in
preference to being |abandon|ed. In the case of a [No Name] buffer,
hidden or not, it will get a _.swp (or _.swo _.swn etc.) swapfile.
I use 'autowriteall' but not 'hidden'. This means that (with the
ex-commands I use) a buffer won't become hidden without my say-so.
Instead of |abandon|ing a buffer, Vim will save it to disk (then unload
the buffer and delete its swapfile), and in the case of a 'modified' [No
Name] buffer I'll get a message telling me to use an exclamation mark if
I want to abandon changes.
Best regards,
Tony.
--
OUTCONERR
Twas FORTRAN as the doloop goes
Did logzerneg the ifthen block
All kludgy were the function flows
And subroutines adhoc.
Beware the runtime-bug my friend
squrooneg, the false goto
Beware the infiniteloop
And shun the inprectoo.
Both freebsd and windows share the same settings, so I don't think
hidden is relative to my problem.
>
>
> Best regards,
> Tony.