Hi, I tried to use pydiction on my Unix system. According to its installation instructions, I just put all the files under ~/.vim/after/ftplugin/
and then tried to use the Tab completion in a Python script. But it did not work. Then I added 'filetype plugin on' into '~/.vimrc', still, it did not work. What can the problem be? Thanks!
- The install instructions also include:
then make sure you set "g:pydiction_location" to the full path of where you installed complete-dict, i.e.:let g:pydiction_location = 'C:/vim/vimfiles/ftplugin/pydiction/complete-dict'
- did you do this?
- They also say,
You may install the other files (complete-dict and pydiction.py) anywhere you want. For this example, we'll assume you put them in C:\vim\vimfiles\ftplugin\pydiction\
Do not put any files but python_pydiction.vim in the ftplugin directory, only .vim files should go there.
- Your statement above ("I just put all the files under ~/.vim/after/ftplugin/") indicates that you ignored this advice.
- --Fritzophrenic 15:39, July 8, 2011 (UTC)
I find this tool is MUCH more useful when you sort the dictionary (alphabetically, then by number of "."'s) That way, your results come up in the order in which they are relevant (immediate children come first).
To do this:
cat complete-dict | sort -n |awk '$0=NF-1 $0OFS' FS=. complete-dict | sort | sed 's/.\(.*\)/\1/' > complete-dict2 mv complete-dict2 complete-dict
This sorts alphabetically->appends count of number of "."'s in the entry at the start of the line-> sorts by those numbers-> removes those added leading count numbers.
Had issues trying to get this to work. Using Linux, and create the ~/.vim/after/ftplugin/. Then moved the python_pydiction.vim file to that folder, but when I put the filetype plugin on in vim, it gave me some errors.
Error detected while processing /home/guest/.vimrc: line 12: E319: Sorry, the command is not available in this version: filetype plugin on line 13: E319: Sorry, the command is not available in this version: let g:pydiction_location='~/.vim/plugin/complete-dict'
I am confused if the let g:pydiction_location... was supposed to go under filetype. Regardless filetype also gives me a command not found here. --JZA 6:42, April 18, 2012 (UTC)