Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First off, thank you for asking this question, as it forced me to figure this out myself and it's great!</p> <p>Here is the page I used as a reference: <a href="http://github.com/orestis/pysmell/tree/v0.6" rel="noreferrer">PySmell v0.6 released : orestis.gr</a></p> <ol> <li>Install PySmell using the <code>setup.py install</code> command.</li> <li>Generate the <code>PYSMELLTAGS</code> file for django by going to your <code>site-packages/django</code> directory and running: <code>pysmell . -o ~/PYSMELLTAGS.django</code></li> <li>Copy that file to your project directory, and then ran <code>pysmell .</code> to generate the project PYSMELLTAGS file</li> <li>Make sure pysmell is in your <code>PYTHONPATH</code> (<code>export PYTHONPATH=${PYTHONPATH}:/path/to/pysmell/</code>)</li> <li>Run vim (<code>vim .</code>)</li> <li>Source <code>pysmell.vim</code> (<code>:source /path/to/pysmell/pysmell.vim</code>)</li> <li>Set the autocomplete command (<code>:set omnifunc=pysmell#Complete</code>)</li> <li>Type ^x^o to autocomplete and it should work</li> </ol> <p>I realize this is not a sustainable solution, but you should be able to use this as a start to getting it setup to always work (e.g., add the export to your .bashrc, add the :source to your .vimrc, setup <code>autocmd FileType python set omnifunc=pysmell#Complete</code>, etc.)</p> <p>Let me know if this is enough to get you started. It worked for me!</p> <p><strong>Edit</strong> I simply added this to my .vimrc and as long as the <code>PYSMELLTAGS</code> &amp; <code>PYSMELLTAGS.django</code> files are in my project root, it works fine without any other work:</p> <pre><code>python &lt;&lt; EOF import os import sys import vim sys.path.append("/usr/local/python/lib/python2.5/site-packages") EOF exe ":source ~/src/pysmell/pysmell.vim" autocmd FileType python set omnifunc=pysmell#Complete </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload