1.0 On Vim.org
I've Vimballed it up, turned off debug and actually provided some install details.Download
it, give it a whirl and make sure you rate it if you like it. Let's try and get his baby into the top 50!
Comments and bug reports to the usual address.
Here it comes...
Revision 96 is the great merging of the Textmate branch to trunk. All hail Subversion and its mighty revision skills.
There are no outstanding issues for the branch and all outstanding enhancements have been pushed back to 1.1. I've updated the docs so all that remains is the creating of the Vimball.
Watch this space.
(suggestions for magic variables are welcome. Act fast to get them into the official release. At the moment I've got SNIP_ISO_DATE and SNIP_FILENAME. If this text is in a snippet then it'll get replaced as appropriate. I'm sure you can guess with what).
HOWTO: Try out the latest version of SnippetsEmu
After teasing you all with the great new things available in the TextMate branch it was pointed out that maybe it wasn't entirely obvious how to go about trying it out for yourself.
What follows is a description of my current set up. It works for me and works well but YMMV, IANAL, ROFL, WYSIWYG.
Firstly, remove (or backup to elsewhere) your current snippetsEmu installation. This will mean moving the plugin itself (in 'plugin'), the documentation (in 'doc') and the bundles (in 'after/ftplugin').
Download an install Subversion
. Check that you can get this working on your appropriate command line.
Create a directory outside of your current Vim installation. This is just to ensure we don't break anything by accident.
Checkout the latest version of the TextMate branch:
svn checkout http://snippetsemu.googlecode.com/svn/branches/textmateOnly/ Your_new_directory
Open up your vimrc and add in the new directories:
Note that you need to add the 'after' directory or the bundles won't get picked up.
That's it. Restart Vim and everything should work.
Make sure you submit any bugs you find!
New Default tags
The current textmate branch bundles will use whatever start and end tags a user has defined. As a result I've been testing out some other combinations. My current favourites are <<>> but as single characters. I.e. ASCII chars 171 and 187. Try them yourself. In insert do and then type 171 or 187.
They work fine in Windows but not Unix so I'm going to have to hunt down that particular bug first.
TextMate branch only. Time to start moving all this goodness to trunk.
1.0 Looking Good
The TextmateOnly branch is looking quite good. It could do with some more testers but it seems to be holding together. There's a slight conflict with matchit and there's a weird off-by-one problem for some people but it's working fine for me :-)
Some of the features I've got working:
- Select mode highlighting: tag names get highlighted in visual mode and are replaced when you start typing
- Commands hidden away: Tag commands are now removed from on-screen so things look tidier.
- Special variable replacement: Not many at the moment but the code's there and is easy enough to add to
- Expansion command execution: Can be used to insert command output when the snippet is expanded without having to tab through a tag.
- Cleaner code: not one for the users but I've given the code a clean up which is making things easier.
- Supertab support: Experimental at the moment but the plugin is now compatible with supertab. Snippet expansion takes precedence but if one is not found supertab takes over.
I'm also going to change the bundles so that if someone were to change the start and end tags all the snippets would work. There's a down side to this but I think the ups outweigh it.
1.0 ready for testing
Brave souls can try out the textmate branch if they're feeling brave.
You might get some ugly error messages but it seems to be working at the moment. The main improvement is cleaner tags onscreen. One thing that has always annoyed me about the current implementation is that tag commands are on screen. The new branch introduces a bit of magic to keep them hidden but it seems to be working.
Right. Trust me. 1.0 is really under development now. You'll see commits in the branch and everything. The branch is broken at the moment, however. There are a lot of big changes going on in the code so consider the branch unstable.
I'll keep you posted on the new features I'm putting in as and when they appear in the code.