[TxMt] Setting document language

Hans-Joerg Bibiko bibiko at eva.mpg.de
Mon Mar 10 12:09:40 UTC 2008


Hi,
On 10 Mar 2008, at 12:34, Alberto Simões wrote:
> Is there any string we can add somewhere in a document such that TM
> recognizes it and sets the correctly spelling dictionary?
>
> Basically, everytime I change from a PT to EN document (or vice-versa)
> I need to change the spelling language.
I have the same problem. To reduce the clicking I'm using my TMTOOLS  
plugin.
- download http://email.eva.mpg.de/~bibiko/downloads/textmate/ 
TMTools.tmplugin.zip
- unzip it and double click at TMTools.tmplugin to install
{for help type
"$TMTOOLS" help me
in an empty line and press CTRL+R}

I created some  shortcuts to change the spell checker's language via
"$TMTOOLS" set spellCheckerLanguage '{to=pt;}' for Portugês
"$TMTOOLS" set spellCheckerLanguage '{to=en_GB;}' for British English

Furthermore you can use:

"$TMTOOLS" complete usingDictionary  
'{lang="pt";showInternalListFirst=yes;}'

as a command (output discard, bound to what you like) to popup a list  
for Portuguese word completion [showInternalListFirst=yes means that  
words already used within the current doc are shown firstly]


Of course, one could add a commented line within the document and  
write a script which parses it and set the language according to it.

Adeus,

Hans
  


More information about the textmate mailing list