Steps to build your own IDE plug-in using Vim+python

Source: Internet
Author: User
Today colleague small partner suddenly told me that he used the editor Sublime3 cause the notebook suddenly lag, look at that time memory ate 30G, and his notebook total 8G memory, suspect is memory leak, decisive change back to the original used Pycharm. Because I also use pycharm learning Python, know that its memory usage is also more than 1G, hear him this news, I decided to change back I have been accustomed to vim, after all, "The God of the editor" is not the fame of the waves.

The so-called build, in fact, is to find some suitable for their own plug-in, the first simple summary of some of my pro-measured several plug-ins. Before beginning to explain a point, here are a few plug-ins are very strong and famous, but the so-called suitable for their own is the best, the article said the shortcomings are relatively personal feelings, not applicable to all. Share it just to give you a reference when you choose. Thank you ~

1.vim Plug-in Manager

Vim-pathogen VS Vundle.vim:

Both plugins are Vim's artifacts used to manage Vim's plugins. Pathogen after the configuration is easy to use is simply to put your downloaded VIM plug-in ~/.vim/bundle (also customizable) directory can be, and vundel each need to change VIMRC file, but the convenience of Vundel is to change after the VIMRC file , can be used directly in VIM: Plugininstall to plug-in one-click installation, the principle is automatically downloaded from GitHub and other sources.

Here I choose Vundle, because I can see from the configuration file I installed the plug-ins, unnecessary plug-ins directly commented out. such as plugin part is I install plug-in, at a glance.

2.python Support

For me, auto-completion, and grammar detection is the ultimate choice for using Jedi-vim.

Simply say your own intuitive feeling:

Python-mode:

Advantages: Ability to auto-complete, with Python syntax detection and code folding and other functions, very powerful.

Disadvantage: Automatic completion of the function in passing display Help information, the page display is not concise, beautiful, grammar detection function.

The following is an example:

Youcompleteme:

Advantages: Automatic completion, simple interface, multi-language support, very powerful, complete. Among the three are the most star on GitHub.

Cons: It may be too powerful to add a bit slower after syntax detection. Configuration is slightly cumbersome.

Jedi-vim:

Advantages: The advantages for me, is the above two shortcomings it has been made up. Loading speed is very fast, the page is very concise.

Disadvantage: No grammar detection, function is not ycm strong, but sufficient enough.

So, I finally chose the Jedi-vim.

3.python Syntax Detection

With automatic completion is the grammar detection, personal tendency PEP8 standard, and hope that the syntax error correction can be immediately recognized by the editor.

I have measured the following several checker:

Flake8, pep257, Pep8, Pycodestyle, syntastic

Pydocstyle, Pyflakes, Pylama, Pylint, Python

And finally I chose to use plug-ins: "W0rp/ale", its most comprehensive syntax detection, interface concise, error correction can be immediately recognized, and is asynchronous, do not worry about loading slow crashes and other issues. Such as:

4. Automatic completion of the enhanced version

Previously mentioned in the vim inside of the Python automatic completion, in order to make vim more powerful, introduce a plug-in Neocomplete.vim, use it to make the completion of vim everywhere. As it will directly complement the shell path.

One thing to note: Neocomplete requires Vim 7.3.885+ compiled with If_lua.

5. Directory Tree Plugin

The directory tree plugin is naturally nerdtree, plus a vim-nerdtree-tabs reinforcement function. As follows:

Finally, the sentence, the best for their own.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.