background preloader

With python

Facebook Twitter

Start - pythoncomplete - Python Omni Completion : vim online - Pentadactyl. Start - vim-keys : Code : leo-editor - Pentadactyl. Start - VIM as Python IDE | Alain M. Lafon - Pentadactyl. Finding the perfect IDE for Python isn’t an easy feat. There are a great many to chose from, but even though some of them offer really nifty features, I can’t help myself but feel attracted to VIM anyway. I feel that no IDE accomplishes the task of giving the comfort of complete power over the code – something is always missing out. This is why I always come back to using IDLE and VIM. Those two seem to be best companions when doing some quick and agile hacking – but when it comes to managing bigger and longer term projects, this combo needs some tweaking.

This is where we are going: So, these are my thoughts on a VIM setup for coding (Python). Modern GUI VIM implementations like GVIM or MacVIM give the user the opportunity to organize their open files in tabs. Being able to neatly work on multiple files, the user still misses the potential his favourite IDE gives him in visualizing classes, functions and variables. From the eye-candy to the implementation. . to vimrc.

Start - pep8 - Check your python source files with PEP8 : vim online - Pentadactyl. Start - Continue omnicompletion for python modules - Vim Tips Wiki - Pentadactyl. I was using the Python omni-completion feature in Vim, and I noticed that when you complete a module name, it inserts the module name, followed by a dot (presumably because you would then want to access something inside the module). This is helpful, except that it breaks common omnicompletion keybindings, such as imap <silent><buffer> . . <C-X><C-O> In order to get completions for this module, one would have to either manually type <C-X><C-O> to run the completion function again, or delete and then re-insert the period.

The correct solution is, of course, to fix the Python omnicompletion module. However, this 'feature' is present in all default installations of Vim. Here is a stopgap solution. Imap <silent><expr><buffer><CR> pumvisible() ? How do you enabled omnicompletion for modules, does it work for external modules too? Is there a version of vim that doesn't have the "feature" that you mentioned? Start - python_calltips - Display Python code calltips and allows you to auto-complete your Python code : vim online - Pentadactyl.