views:

81

answers:

2

So I installed pydiction into vim for autocompleting my python code in windows. No problemo. Worked like a charm.

Tried the same thing with my Ubuntu setup, creating the .vim/after/ftplugin directory in my home folder and updating the vimrc with the correct path of the pydiction dictionary but I fail every time. Why is that ? I follow the readme.txt closely , I even found a webpage that describes the process on ubuntu again repeating the same things , nothing.

Each time I tab after i type "raw" while it worked in windows in ubuntu it reports "Dictionary Completion (^K^N^P) Pattern not Found". Tried other keyword , same problem. Anyone has an idea why this happens ?

A: 

Sounds like it's having a problem with your complete-dict file. I'm using Ubuntu 10.04 and it works fine for me. Make sure your complete-dict file actually has content in it, in this case make sure it has the word 'raw' in it.

rkulla
A: 

Problem has been solved, apparently gvim did not like the fact that i put the files in a ".vim" directory even though that was exactly what the instructions told me to do. I put them in my home folder pydiction.vim and complete-dictionary and now it works ok, with no issues.

Now autocomplete works with any word I tried it with. I am abit confused with gvim , as the instructions said to create ".vim" directory but I have also found a vimfiles directory in a etc folder. Why vim structure is so confusing? Maybe the manual should clarify directory structure to avoid confusing. Now I use a source command to load pydiction.vim from my home folder and setup the vimrc properly to point to the new paths.

At least I solved my problem myself , thanks for all replies.

Kilon
Type ":set runtimepath" to see the dirs vim looks in. Mine has ~/.vim first. If you type ":h rtp" it shows that under unix like systems the default place to look first is "$HOME/.vim".
rkulla
yes you are right that is exactly what it displays. But where "~" really is ? and $HOME is it the home folder or is it my user home folder in my case home/kilon ? A reason that my path did not work is that i accidently made the .vim folder with root privileges, I used the sudo nautilus command to access another folder and deleting some root permission files , but even though i gave kilon permission to .vim folder when i returned back it had root permissions, so i pressume that was the reason that gvim/vim has been unable to access those file.
Kilon
~ is your user's home directory, eg /home/kilon. Thus you don't need sudo to create directories there. Test this yourself with "echo ~" and "echo $HOME". So just mkdir ~/.vim (and any subdirs like ~/.vim/plugin, etc) if they're not already there and you're good to go.
rkulla
thnaks for the reply, I think I understand the problem , it seemed I messed up with the sudo command. But all is well now.
Kilon