Question

I use vim for basic text editing but now I want to use as Python IDE. I don't know where to start. So, I did search and found this video. It gives me a very brief idea about setting up vim.

I am still confused about the tools (vim or macvim), vim plugins, pathogens and how to setup as VIM ide.

Experts, please help me by pointing me to the resources which can help me to understand and learn vim and unleash the power of vim as an IDE.

Was it helpful?

Solution

I recommend installing the vundle plugin.

Then, add the following bundles to your vimrc file. (after reading how to configure/use vundle)

Plugin 'klen/python-mode'
Plugin 'tpope/vim-surround'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'davidhalter/jedi-vim'

Whenever you add things for plugins for vundle to manage, make sure to run :BundleInstall in a new vim instance.

You can check out each of those projects on github for their dependencies. The only one I can think of off the top of my head is jedi-vim, which requires you to install jedi (pip install jedi)

vim-surround contains handle operators for surrounding delimiters (), [], "", {}. see :help surround after install for usage.

vim-easymotion is great for moving around the page. see :help easymotion

I prefer the autocompletion of python with jedi-vim instead of rope completion that comes with python-mode. Its much quicker and more expressive. To disable rope completion in python-mode, add the following to your vimrc after all the vundle plugin initialization.

let g:pymode_rope_lookup_project = 0
let g:pymode_rope_completion = 0
let g:pymode_rope_complete_on_dot = 0

Other plugins I recommend are:

kien/ctrlp.vim searching for file names, and buffer management

scrooloose/nerdtree project file explorer

OTHER TIPS

About a plugins - this will be very useful python-mode

Python-mode contains:

  • PyLint/PyFlakes/Pep8/mccabe (a python source code analyzers)
  • Rope (a python refactoring library)
  • PyDoc (documentation generator and help system)
  • Python syntax highlighting

and many other features. They all working out of box and provide a lot of options for configuration. For the more help see :help pymode.txt.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top