As much as I like my Vim, there are times when I want it to be just a little cooler. So in XCode, for example, there’s this nice introspection feature that I’ve been dying to have for a while now.
Needless to say, I couldn’t stop myself from bringing this functionality to Vim. Here is the finished result:
If pictures aren’t enough, you can also watch a movie if you’re still not convinced :).
1. Install snippetsEmu to
2. Download introspection.vim and also move it to
3. (optional) Add
autocmd BufEnter *.py call FilterFile() to your
.vimrc. This calls the introspection function whenever you open a buffer containing a Python file.
1. Type up a function. E.g.
2. Save the file and type
3. Now you can type
insert_into_db<tab> and a snippet will appear. Use
<tab> to navigate to the next field.
4. Fork the code on Github and get it working for other languages!