Least Action

Nontrivializing triviality..and vice versa.

An evolving .vimrc – VIM with Python

leave a comment »

I’ve switched almost completely to Python for my Master’s thesis. The question that comes up when you use Python is…what IDE to use? There seem to be a whole bunch of them but none of them worked for me, for one reason or another. So for now, I am using vim, and will explore different ways of customizing it for use with Python. For now here is a minimalist ~/.vimrc.

filetype off

set nu
filetype plugin indent on
syntax on
set modeline
set background=dark
autocmd FileType python set complete+=k~/.vim/syntax/python.vim isk+=.,(

map <buffer> <S-e> :w<CR>: !/usr/bin/env python % <CR>

I’ll explain and elaborate in due course of time.

For now, you might want to ignore the line containing autocmd (just put a # before it). Also, for starters ~/ refers to your home directory. And files beginning with a dot (.) are hidden by default so an “ls -l” won’t show them, but an “ls -aCF” will. So just use your favorite editor and copy paste the above text into a file called “.vimrc” which is placed in your home directory (~/.)


Written by Vivek

April 29, 2013 at 15:18

Posted in Uncategorized

Tagged with , , , ,

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: