Thursday, January 31, 2013

Vim for Python Development

Testing a PyOpenCL demo in vim.

This is my collection of hacks that turn vim into a python IDE.

Syntax Highlighting


I'm using Arch Linux and Syntax Highlighting comes installed with my Vim package. I just need to enable the syntax highlighting in my .vimrc file:

Enable line numbers


Is as simple as adding this line to the .vimrc

Indentation


Adding this to the .vimrc file will enable PEP8 indentation only for *.py files.

Autocompletion


I use the great jedi-vim plugin from David Halter and the SuperTab plugin. You can find the installation steps at RedKrieg's post: Writing Python like a Jedi.

Testing the jedi-vim plugin

Executing python code inside vim


This is my favorite, press the F5 key to save the python script and execute it. Add this to the .vimrc file.

Enable file specific features


To enable all the filetype features I've defined above the following lines are needed in the .vimrc file.

Other plugins


Here is a collection of other useful plugins, I recommend installing them using pathogen if you can't get them from the repositories of your Linux distro.


If you have hacks of your own, please share them with everyone in the comments section.

10 comments:

  1. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog.

    ReplyDelete
  2. Nice blog..! I really loved reading through this article. Thanks for sharing such a
    amazing post with us and keep blogging... best angularjs training institute in chennai | angularjs training in omr | .angular 4 training in chennai | angularjs training in omr

    ReplyDelete
  3. This is often simply what I would like to say when commenting on a newspaper. Looking forward to several interesting and useful articles from you. The article is incredibly intensive and effective.

    DedicatedHosting4u.com

    ReplyDelete
  4. Hiiii...Thanks for sharing Great info...Nice post...Keep move on...
    Python Training in Hyderabad

    ReplyDelete
  5. Selling USA FRESH SPAMMED SSN Leads/Fullz, along with Driving License/ID Number with EXCELLENT connectivity.

    **PRICE**
    >>2$ FOR EACH LEAD/FULLZ/PROFILE
    >>5$ FOR EACH PREMIUM LEAD/FULLZ/PROFILE

    **DETAILS IN EACH LEAD/FULLZ**

    ->FULL NAME
    ->SSN
    ->DATE OF BIRTH
    ->DRIVING LICENSE NUMBER WITH EXPIRY DATE
    ->ADDRESS WITH ZIP
    ->PHONE NUMBER, EMAIL, I.P ADDRESS
    ->EMPLOYEE DETAILS
    ->REALTIONSHIP DETAILS
    ->MORTGAGE INFO
    ->BANK ACCOUNT DETAILS

    >All Leads are Tested & Verified.
    >Invalid info found, will be replaced.
    >Serious buyers will be welcome & I will give discounts for bulk orders.
    >Fresh spammed data of USA Credit Bureau
    >Good credit Scores, 700 minimum scores
    >Bulk order will be preferable
    >Minimum order 20 leads/fullz
    >Hope for the long term business
    >You can asked for samples, specific states & zips (if needed)
    >Payment mode BTC, PAYPAL & PERFECT MONEY

    Email > leads.sellers1212@gmail.com
    Telegram > @leadsupplier
    ICQ > 752822040

    ''OTHER GADGETS PROVIDING''

    >SSN Fullz
    >Dead Fullz
    >Carding Tutorials
    >Hacking Tutorials
    >SMTP Linux Root
    >DUMPS with pins track 1 and 2
    >Sock Tools
    >Server I.P's
    >USA emails with passwords (bulk order preferable)

    **Contact 24/7**

    Email > leads.sellers1212@gmail.com
    Telegram > @leadsupplier
    ICQ > 752822040

    ReplyDelete