On 16/12/13 05:05, Tony Mechelynck wrote:
On 16/12/13 04:12, mattn wrote:
Hi.

$ vim
:echo v:oldfiles
['/path/to/oldfile.txt', ....snip....]

$ vim -u NONE
$ echo v:oldfiles

This return empty because VV_OLDFILES isn't initialized with allocated
list.

Isn't this intentional? With -u NONE, Vim starts in 'nocompatible' mode,
------------------------------------------------------^
OOps: in 'compatible' mode, of course

thus the default for 'viminfo' is the empty string… and Vim doesn't use
a viminfo file (doesn't read it on startup and doesn't write it on
exit). Thus there is no list of oldfiles read from the viminfo.

Counterexample:

vim -N -u NONE
:oldfiles

(in plain-vanilla Huge Vim 7.4.131) shows that the oldfiles list has
been populated.

See :help 'viminfo'



diff -r 7818ca6de3d0 src/main.c
--- a/src/main.c    Wed Dec 11 18:53:29 2013 +0100
+++ b/src/main.c    Mon Dec 16 12:05:52 2013 +0900
@@ -701,6 +701,10 @@
      read_viminfo(NULL, VIF_WANT_INFO | VIF_GET_OLDFILES);
      TIME_MSG("reading viminfo");
      }
+# ifdef FEAT_EVAL
+    if (get_vim_var_list(VV_OLDFILES) == NULL)
+    set_vim_var_list(VV_OLDFILES, list_alloc());
+# endif
  #endif

  #ifdef FEAT_QUICKFIX

- Yasuhiro Matsumoto


Best regards,
Tony.
--
"Too many of our best scholars, themselves indoctrinated from infancy in a
 religion of one kind or another based upon the Bible, are so locked into
 the idea of their own god as a supernatural fact - something final, not
 symbolic of transcendence, but a personage with a character and will of
 his own - that they are unable to grasp the idea of a worship that is not
 of the symbol but of its reference, which is of a mystery of much greater
 age and of more immediate inward reality than the name-and-form of any
 historical ethnic idea of a deity, whatsoever...and is of a sophistication
 that makes the sentimentalism of our popular Bible-story theology seem
 undeveloped."
       [Joseph Campbell, American mythologist (1904-1987)]

--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui