On 8月20日, 下午4时35分, Christian Brabandt <cbli...@256bit.org> wrote: > Hi eliweiq001! > > > And besides, when I > > :call OpenLastModified(1) > > > there is an error: > > > Error detected while processing function OpenLastModified: > > Line 5: > > E684: list index out of range: -1 > > E15: Invalid expression: files[-1] > > What make you think, you were supposed to call it with the parameter 1? > The optionally parameter to that function is supposed to be a path. > Therefore the command :OpenLastModified was provided, that allows for > tabcompleting a directory optionally. > > regards, > Christian
Because I don't understand the function, I just copy it and use it. When I type :call OpenL and press Tab, it will change to :call OpenLastModified( another Tab, it will change to :call OpenLastModified(1() one more Tab, it will be :call OpenLastModified(10() one more Tab, it will be :call OpenLastModified(100() one more Tab, it will be :call OpenLastModified(101( ...... So I don't know what does it mean. If I :call OpenLastModified() it will say that Undefined variable: a:1 ......... If I put a directory to be the parameter, it will say Undefined variable too. Such as :call OpenLastModified(D:\) in windows, it will say E121: Undefined variable: D: E116: Invalid arguments for function OpenLastModified Then I try :call OpenLastModified(.\) , it will say E15: Invalid expression: .\) E116: Invalid arguments for function OpenLastModified -- 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