[TxMt] Latex: How to use new "`"' ?

Charilaos Skiadas skiadas at hanover.edu
Thu Oct 5 23:49:46 UTC 2006


Hi Niels,

	The change was just in the language grammar, so that a text in  
"`..."' does not get colored as invalid, as it did beforehand. We've  
made no provisions for how to type it out, but if you want to I would  
suggest you create a command, bound to whatever shortcut you like,  
and with input "Selected Text or Nothing" and output "Insert as  
snippet", and actual code:

#!/usr/bin/env ruby
require ENV['TM_SUPPORT_PATH'] + '/lib/escape.rb'
if ENV['TM_SELECTED_TEXT'].nil? then
   print "\"` $1 \"'"
else
   print "\"` #{e_sn ENV['TM_SELECTED_TEXT']} \"'"
end



This will make it so that if you run the command with a selection, it  
will do the right thing, while if you do it without a selection, it  
will also do the right thing. The only way in which this is different  
from smart typing pairs is that if you press delete right after  
running the command, the closing stuff is not removed, so you have to  
use cmd-Z to revert the action. Other than that, it should work as  
expected (provided I didn't misspell anything in that code ;)  ).

Haris


On Oct 5, 2006, at 4:57 PM, Niels Kobschaetzki wrote:

> Hi!
>
> I just wanted to ask how to use the new "`"' ?
> When I type " it autocompletes to "" setting the cursor between the  
> two "
> When I type now ` the whole thing becomes "`'" and not "`"'
>
> Niels
> -- 





More information about the textmate mailing list