0

I need auto-completion in vim for programming languages, for that I downloaded the AutoComplPop followed the instructions mentioned there and copied the files cp -r

Downloads/ns9tks-vim-l9-3bb534a720fa/plugin/*
Downloads/ns9tks-vim-l9-3bb534a720fa/doc/*
Downloads/ns9tks-vim-l9-3bb534a720fa/autoload/*

to the vim directories

/usr/share/vim/vim74/plugin/
/usr/share/vim/vim74/autoload/
/usr/share/vim/vim74/doc/

It gave the error about L9 : Vim-script library, downloaded from here and did the same with these files copied its file to the vim respective directories when I copied the autoload directory content of the L9 library there was sub directory named l9 when it goes there in vim autoload directory it gave the permissions problem so I changed its permissions to chmod 644, now it doesn't give the L9 Library error but when I edit a file

vim hello.html

it gives the errors when I press i to insert and keep giving the errors if I type anything.

Error detected while processing function <SNR>9_feedPopup..<SNR>9_finishPopup:
line    4:
E117: Unknown function: l9#tempvariables#end

Press ENTER or type command to continue

and surely auto-complete doesn't work !
Help !

3 Answers 3

0

i used this method to install this plugin and it worked perfectly :

  1. download the latest version of the plugin fron here http://www.vim.org/scripts/script.php?script_id=1879
  2. create the folder "~/.vim" with the command "mkdir ~/.vim".
  3. extract the contained of your downloaded file (the first step) (you will have a new folder called "vim-autocomplpop" when you finish the extraction)
  4. copy all the contained of the folder "vim-autocomplpop" into the folder "~/.vim" with the command "cp -r /path/to/vim-autocomplpop/* ~/.vim/".
  5. add the lines of this website in your ".vimrc" file http://fr.openclassrooms.com/forum/sujet/vim-autocompletion-avec-tab
  6. open vim now and you'll see that it works like magic.
3
  • what is the location of "vimrc" file ? and the website you [link]( fr.openclassrooms.com/forum/sujet/vim-autocompletion-avec-tab) provided is in some other language I can not understand. can you provide some link in English ?
    – Waqas
    Jan 10, 2014 at 19:31
  • when you're in your home folder use the «Ctrl + h» to see invisible files, you'll see that there is a file named ".vimrc", this file is used to load automatically some options in the start-up of vim (so you won't have to write them every time you open vim). for the website that i give you, just copy the lines that are in the blue area (those who starts with "autocmd").
    – sido
    Jan 11, 2014 at 17:34
  • i am having this problem after that i dont have ".vimrc" file in home folder any i guess i have deleted it how can i reinstall and get vim back or can get those files back ? i tried re installing it but it doesnt work
    – Waqas
    Jan 11, 2014 at 20:12
0

you just have to create another .vimrc file with this command "touch ~/.vimrc", then all what you have to do is to put this lines in it with a text editor, then you just have to do what i told you to do in the firs message(except for the 4th step because i already included those lines in this answer)

runtime! debian.vim
if has("syntax")
syntax on
endif
set background=dark
set showcmd " Show (partial) command in status line.
set ignorecase " Do case insensitive matching
set autowrite " Automatically save before commands like :next and :make
set mouse=a " Enable mouse usage (all modes)
set ts=4
set number
set lbr
set smartindent
set shiftwidth=4
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete
highlight PmenuSel ctermfg=0 ctermbg=7 guibg=Grey
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
1
  • Hi, you have already answered this question here.. Moreover, this is not a different answer... So, you should instead edit the answer you already posted earlier and delete this answer... You would find a button called "edit" below the body of your answer.
    – Aditya
    Jan 12, 2014 at 8:13
0

Did you make the same chmod changes to the files inside that autoload/l9 directory?

So you are talking about two plugins by the same author:

AutoComplPop 2.14.1 http://www.vim.org/scripts/script.php?script_id=1879

L9 1.1 http://www.vim.org/scripts/script.php?script_id=3252

Your text says you installed them both. I installed them both and they seem to work OK. Please double check they are installed properly. The error you are getting talks about not finding autoload/l9/tempvariables.vim line #46 where there's an end function.

If the permissions on the files in that autoload/l9 directory don't allow you to get to the proper function it seems like that would be the error it would give.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .