Random notes from mg

a blog by Marius Gedminas

Marius is a Python hacker. He works for Programmers of Vilnius, a small Python/Zope 3 startup. He has a personal home page at http://gedmin.as. His email is marius@gedmin.as. He does not like spam, but is not afraid of it.

Wed, 09 Dec 2009

Unix is an IDE, or my Vim plugins

Unix is an IDE. I do my development (Python web apps mostly) with Vim with a bunch of custom plugins, shell (in GNOME Terminal: tabs rule!), GNU make, ctags, find + grep, svn/bzr/hg/git.

The current working directory is my project configuration/state. I run tests here (bin/test), I search for code here (vim -t TagName, find + grep), I run applications here (make run or bin/appname). I can multitask freely, for example, if I'm in the middle of typing an SVN commit message, I can hit Ctrl+Shift+T, get a new terminal tab in the same working directory, and look something up. No aliases/environment variables/symlinks. I can work on multiple projects at the same time. I can work remotely (over ssh).

Gary Bernhardt's screencasts on Vimeo show how productive you can get if you learn Vim and tailor it to your needs. I have Vim scripts that let me

Some of these come from www.vim.org, some I've written myself, some I've taken and modified a little bit to avoid an irritating quirk or add a missing feature. Some things I don't have (and envy Emacs or IDE users for having -- like an integrated debugger for Python apps, and, generally, integration with other tools, running in the background).

It's been my plan for a long time to polish my plugins, release them somewhere (github? bitbucket? launchpad?) and upload to vim.org, but as it doesn't seem to be happening, I thought I'd at least put an svn export of my ~/.vim on the web.

posted at 01:23 | tags: , , | permanent link to this entry | 8 comments
I agree with you completely. Bash + Vim + Python = everything the coder needs.

However, I've found that when working with monstrous platforms, such as .Net, intellisense (via MonoDevelop for instance) allows me to retain my sanity.
posted by Simon Wittber at Wed Dec 9 06:30:52 2009
Interesting. And, I know others think this way as well (John Costigan -- Maemo Mapper -- told me that all he uses is Vim). Personally, I just could never remember everything I'd need to remember to do this. I use a text editor for all of my html/css/js work now, but that's only after many, many years of using more robust methods. So, kudos to you. :) I wish I could do that.
posted by timsamoff at Wed Dec 9 19:19:32 2009
Ctrl+Shit+T.
i like that
posted by required at Thu Dec 10 09:41:44 2009
Hi,

thanks for this list of vim plugins... and for sharing your .vim directory :)  Some pretty cool stuff by the looks of it.  Will have to check them all out later.

One addition I have around always, is an ipython shell or two open for each project.
posted by Rene Dudfield at Thu Dec 10 14:22:04 2009
I try more complicated editors from time to time, but vim is 90% there "out of the box", add in a simple .vimrc file and you're set. If you do any contract work, it's a godsend.

With compiled languages, I've tried stuff like Eclipse from time to time, but after you do something more complex than the samples, you wind up playing "hunt the setting." Even with the kludgiest makefile, you can just jam some echo statements in there to find out why the compiler is getting some option you didn't want.
posted by ben at Fri Dec 11 17:25:32 2009
I started using vim to replace MS Visual Studio when I started doing middleware C++ code that had to also run on Linux and AIX.  After a while, I couldn't use Visual Studio because it was missing too many features, and provided too few.

Now I do web programming, and use Linux/gvim with very few plugins.  I use the bash shell and ack-grep a lot. I assigned Windows-key + T for the terminal, and the shifted combo for a custom terminal for running gvim, which is wider; vim seems to match its width to the terminal width, so I use this feature to get the width I like.

I've tried other editors, but find them all lacking, and even though some have nice features, they aren't cross-platform, and I can implement most of the features in vim if I want them.
posted by Marty Fried at Sun Oct 17 20:03:31 2010
I've done a quick hack to your coverage highlighting script to allow it to work in python versions prior to 2.6 as I have to work with 2.4 a lot.

https://github.com/stephenpaulger/vim-scripts-and-plugins/blob/master/plugins/py-coverage-highlight.vim
posted by Stephen Paulger at Tue Feb 1 17:41:25 2011
I now use Syntastic instead of python_check_syntax.vim.
posted by Marius Gedminas at Wed Oct 17 18:19:25 2012

Name (required)


E-mail (will not be shown)


URL


Comment (some HTML allowed)