vim as a python ide

10
VIM AS A PYTHON IDE It’s much easier than you think Martin Brochhaus (@mbrochh ) PyCon APAC 2012 Saturday, June 9, 12

Upload: tom-smith

Post on 26-Dec-2015

45 views

Category:

Documents


0 download

DESCRIPTION

VIM as a Python IDE

TRANSCRIPT

Page 1: VIM as a Python IDE

VIM AS A PYTHON IDEIt’s much easier than you think

Martin Brochhaus (@mbrochh)PyCon APAC 2012

Saturday, June 9, 12

Page 2: VIM as a Python IDE

WHERE DO I COME FROM?

1982 1994 1996 2003 2005 2008 2011

AmigaBasic

Win 95PHP

Dreamweaver

Win XPJAVA

Eclipse

Win XPC#

Visual Studio

UbuntuPython

Wing IDE

UbuntuPythonVim

Saturday, June 9, 12

Page 3: VIM as a Python IDE

• Cross platform

• Standard on most systems

• Very fast

• It’s good for your health (HJKL movement)

• Highly customizable

• Great for pair programming

•Work anywhere, anytime

• Change jobs, keep tools

WHY SHOULD YOU CARE?

Saturday, June 9, 12

Page 4: VIM as a Python IDE

WHAT MAKES AN IDE?

• Fast access to all files

• Color scheme

• Syntax highlighting

• Static code analysis

• Code completion

• Go to definition

• Refactoring

•Debugging

Saturday, June 9, 12

Page 5: VIM as a Python IDE

TOPICS

1. How to install Vim

2. Your first .vimrc

3. Install your plugins

4. Pair Programming

Saturday, June 9, 12

Page 6: VIM as a Python IDE

1. HOW TO INSTALL VIM

# Prerequisites:# (Ubuntu) sudo apt-get build-dep vim# (OSX) Command Line Tools for Xcode

$ hg clone https://vim.googlecode.com/hg/ vim$ cd vim/src$ ./configure --enable-pythoninterp --with-features=huge --prefix=$HOME/opt/vim$ make && make install$ mkdir -p $HOME/bin$ cd $HOME/bin$ ln -s $HOME/opt/vim/bin/vim$ which vim$ vim --version

# on Ubuntu:$ sudo apt-get install gtk2-engines-pixbuf

Saturday, June 9, 12

Page 7: VIM as a Python IDE

2. YOUR FIRST .VIMRC

• Start from scratch

• Get inspired: vimbits.com

• Steal whatever you need

• Ask others (#vim)

• save your .vimrc on GitHub

Saturday, June 9, 12

Page 8: VIM as a Python IDE

3. INSTALL YOUR PLUGINS

• vim-powerline(https://github.com/Lokaltog/vim-powerline)

• python-mode(https://github.com/klen/python-mode)

• ctrlp.vim(https://github.com/kien/ctrlp.vim)

• python_editing(http://www.vim.org/scripts/script.php?script_id=1494)

Saturday, June 9, 12

Page 9: VIM as a Python IDE

4. PAIR PROGRAMMINGhttp://martinbrochhaus.com/2012/05/pair.html

Saturday, June 9, 12

Page 10: VIM as a Python IDE

THANK YOU(https://github.com/mbrochh/vim-as-a-python-ide)

@mbrochh

Saturday, June 9, 12