For the last few days I\'ve been forcing myself to switch from Textmate to Vim. for the most part, my efficiency is pretty much the same after some heavy Vim configuration.
I've been thinking about that automatic building since switching.
Vim has a built-in solution for one part of the problem: the omni-completion engine allows you to complete the path of a file you want to include.
If you begin to type a "path-like" string — say
This 0
is a bit of a problem though. The system is obviously not perfect but once I'll get rid of this nagging 0
it's going to fit rather nicely within the rest of my snipMate-based process.
By the way here is a second modified version of the script I use.
END ANOTHER EDIT
EXTENDED 12" RE-EDIT VERSION
With:
identify
~/.vim/plugins/
~/.vim/nerdtree_plugin
you can:
b
to have an almost complete
tag pasted at the cursor's position in the previous window:IMG
to open a native file selection dialog, chose an image and have an almost complete
tag pasted at the cursor's position in the current window:IMG path/to/file.jpg
to have an almost complete
tag pasted at the cursor's position in the current windowThe snipMate solution is not really baked right now.
Thanks to Petr Mach and @Matteo Riva for actually doing most of the work.
And yes, I'm obviously not a Vim expert.
END EXTENDED 12" RE-EDIT VERSION