1

I am working on a group server and using Vim 6.4 there. And because admin there doesn't let us install new software or having any plugin-manager, I have to manually add those plugin files to runtimepath. However, I don't know why every time I add these files, there are always error when Vim trying to process them.

Here's what the error looks like when I try to add pathogen:

Error detected while processing /home/tiennv/.vim/bundle/vim-pathogen/autoload/pathogen.vim:
line   24:
E128: Function name must start with a capital: pathogen#infect(...) abort
line   25:
E121: Undefined variable: a:0
E15: Invalid expression: a:0
line   34:
E492: Not an editor command:   for path in filter(copy(paths), 'v:val =~# static')
line   35:
E107: Missing braces: pathogen#surround(path)
line   36:
E492: Not an editor command:   endfor
line   37:
E492: Not an editor command:   for path in filter(copy(paths), 'v:val !~# static')
line   38:
E121: Undefined variable: path
E15: Invalid expression: path =~# '^\%([$~\\/]\|\w:[\\/]\)'
line   39:
E107: Missing braces: pathogen#surround(path)
line   41:
E107: Missing braces: pathogen#interpose(path)
line   43:
E492: Not an editor command:   endfor
line   44:
E107: Missing braces: pathogen#cycle_filetype()
line   45:
E121: Undefined variable: pathogen
E15: Invalid expression: pathogen#is_disabled($MYVIMRC)
line   46:
E133: :return not inside a function
line   48:
E133: :return not inside a function
line   49:
E193: :endfunction not inside a function
line   52:
E128: Function name must start with a capital: pathogen#split(path) abort
line   53:
-- More --

And here's what the error looks like when I try to add airline:

Error detected while processing /home/tiennv/.vim/bundle/vim-airline/autoload/airline.vim:
line    6:
E121: Undefined variable: g:
E116: Invalid arguments for function get(g:, 'airline_statusline_funcrefs', [])
E15: Invalid expression:  get(g:, 'airline_statusline_funcrefs', [])
line    8:
E15: Invalid expression: ['a','b','c','gutter','x','y','z', 'error', 'warning']
E15: Invalid expression:  ['a','b','c','gutter','x','y','z', 'error', 'warning']
line    9:
E15: Invalid expression: []
E15: Invalid expression:  []
line   10:
E15: Invalid expression:
E15: Invalid expression:
E15: Invalid expression:  {}
line   13:
E15: Invalid expression: [ function('airline#extensions#apply'), function('airline#extensions#default#apply') ]
E15: Invalid expression:  [ function('airline#extensions#apply'), function('airline#extensions#default#apply') ]
line   16:
E128: Function name must start with a capital: airline#add_statusline_func(name)
line   17:
E107: Missing braces: airline#add_statusline_funcref(function(a:name))
line   18:
E193: :endfunction not inside a function
line   20:
E128: Function name must start with a capital: airline#add_statusline_funcref(function)
line   21:
E121: Undefined variable: g:airline_statusline_funcrefs
E116: Invalid arguments for function index(g:airline_statusline_funcrefs, a:function) >= 0
E15: Invalid expression: index(g:airline_statusline_funcrefs, a:function) >= 0
line   22:
E107: Missing braces: airline#util#warning(printf('The airline statusline funcref "%s" has already been added.', string(a:function)))
line   23:
E133: :return not inside a function
line   25:
E121: Undefined variable: g:airline_statusline_funcrefs
E116: Invalid arguments for function add(g:airline_statusline_funcrefs, a:function)
-- More --

Obviously, something is wrong with my version of Vim or my configuration is somewhat missing. But because I'm not very experienced with Vim, I don't know what's wrong? Can anyone help me with this?

Here is my configuration in .vimrc file:

runtime bundle/vim-pathogen/autoload/pathogen.vim
" runtime bundle/vim-airline/autoload/airline.vim
  • 2
    I very much doubt, that Vim 6.4 can handle all the VimScript extensions that have been implemented since then. It does not understand Dictionaries and Lists and most other VimScript enhancements since Version 7. You should really update your Vim version, Vim 6.4 is from 14 years ago! – Christian Brabandt Mar 21 at 11:24
5

I am sorry, but you won't get happy with your ancient Vim 6.4 and plugins. Most of the scripting functionality have been added with the Vim 7 version and beyond. The old 6 version did only have very limited set of available functions (e.g. glob() was certainly one of them, but did only support String and int as data types.).

So have a look at the errors:

E128: Function name must start with a capital: pathogen#infect(...) abort

That clearly means, that your Vim cannot handle auto-loadable functions.

E492: Not an editor command: for path in filter(copy(paths), 'v:val =~# static')

Your Vim does not understand basic for loops.

I skip the rest of your errors. Have a look at :h version8 and :h version7 to find out about all the new features that the later version provides.

As said in the comments, Vim 6.4 has been released almost 14 years ago. There will be almost no plugin (besides the very basic filetype plugins that came with Vim back then) that will run with that version.

If you cannot update, consider using a self compiled Vim or try the https://github.com/vim/vim-appimage/ (although I really doubt that they will run with the underlying old libc and all other required libraries)

I can say one more word as the maintainer of airline. vim-airline is tested against vim 7.2 and I am trying to keep this compatibility as long as possible. However even Vim 7.2 is already more than 10 years old and is becoming a hassle to support such ancient versions. I am pretty sure it will be almost impossible to support such an ancient Vim as 6.4.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.