E492: Not an editor command: oldfiles
I have the runtime directories/files and the runtimepath and so on correctly
defined and present. As I recall, oldfiles was a patch for vim 7 briefly
discussed as present and then abandoned in 2008 by Bram. If so, it would be
part of the code itself and would not require some or more plugins or extra
runtime scripts. Do not know the history of how this command got eventually
implemented.
What might prevent oldfiles from working in vim, within my redhat
installation? (yes, I ran vim -u NONE but still no oldfiles).
While Im on this topic: Any recommendations for a simple file manager that
lists files for directories, recently edited files (like oldfiles), and
current files in tabs and/or buffers? I never cared much for hierarchial
directory displayed, in any OS (e.g., nerdtree, vimexplorer)
> I find the :oldfiles or :browse oldfiles command to be quite simple and
> convenient. It works as advertised on my 7.3 version of vim in windows xp.
> However, with my 7.0.237 version of vim running on redhat linux, the command
> does not work and I get the error message
>
> E492: Not an editor command: oldfiles
Hi Howard
According to ":help version-7.3", the ":oldfiles" command was added
in this patch:
=======================================================
Patch 7.2.031
Problem: Information in the viminfo file about previously edited files is
not available to the user. There is no way to get a complete list
of files edited in previous Vim sessions.
Solution: Add v:oldfiles and fill it with the list of old file names when
first reading the viminfo file. Add the ":oldfiles" command,
":browse oldfiles" and the "#<123" special file name. Increase
the default value for 'viminfo' from '20 to '100.
=======================================================
So what you observe is expected.
Your Vim-7.0.237 version is very old (05/01/2007).
Why not recompile the latest from sources
checked-out with Mercurial?
-- Dominique
:oldfiles was added in version 7.2.031, quite some time after 7.0.237 was released. You will need to upgrade to a more recent version of Vim to get this feature.
Interesting that my 7.0 help files include a description of this feature! I
have read a description of it being first added as a `tentative patch' in
version 7 that had a bug, and then withdrawn - only to be reintroduced later, apparently.
I could always write a brute force script using, for instance, awk, that
grepped out the filenames from viminfo and offerred them in vim with a prompt.
Might run a bit slow, however.
> On Thu, 8 Mar 2012, Ben Fritz wrote:
> >:oldfiles was added in version 7.2.031, quite some time after
> >7.0.237 was :released. You will need to upgrade to a more recent
> >version of Vim to get :this feature.
> Interesting that my 7.0 help files include a description of this
> feature! I have read a description of it being first added as a
> `tentative patch' in
> version 7 that had a bug, and then withdrawn - only to be reintroduced later, apparently.
it sounds as if your runtime files (which include the help
modules) are newer than your vim
> I could always write a brute force script using, for instance, awk, that
> grepped out the filenames from viminfo and offerred them in vim with a prompt.
> Might run a bit slow, however.
simpler would be to download source and build your own current
vim -- benefits from that would include runtime files that match
the executable, many bugfixes and new features
sc
I think before the oldfiles patch, that information wasn't available in
your .viminfo
regards,
Christian
--