Slippery Snippets
Tuesday, July 25, 2006
  Tag highlighting As mentioned in a previous post I was thinking of adding tag highlighting as a fancy new feature. This was requested by a user who cited the lack of it as the one remaining reason for him not to switch away from imaps.vim. I looked into how imaps does it (boy, is the version on way out of date) and was impressed. I had a good think about how to add it into snippetsEmu and came up against some problems. When imaps highlights a tag it does so by using visual mode. Hitting any key will delete the tag and start insert mode. This does not work so well with the extra stuff SnEmu does. Deleting the whole tag will break the name replacement function and command execution. The best way would involve deleting any variable name but this would require quite a rewrite of the internals. Currently the decision of whether the user has changed a tag's value requires the presence of the name and the start and end markers.

Basically it's non-triv but I'll keep look into what's required.

I'm also going to work on reintroducing default values. I had decided that using tag names would work just as well but then thought up some examples for when it wouldn't. The simplest would be a function call commonly requiring 'Null' as some of its arguments. Having several tags named 'Null' would be useless if you wanted to change the value of just one of them.

Not sure the best way to do this. I'd also like to have auto-executing tags; useful for adding in dates or similar. This can be done at the moment using an empty tag with a command but does require the user to tab through them before the command is executed.

Thoughts and comments welcome as usual. 
Comments: Post a Comment

Subscribe to Post Comments [Atom]

<< Home

July 2006 / August 2006 / September 2006 / October 2006 / November 2006 / December 2006 / March 2007 / April 2007 / May 2007 / July 2007 / September 2007 / February 2008 / June 2009 / December 2010 /

Powered by Blogger

Subscribe to
Posts [Atom]