jessegrosjean / quickcursor

496 stars 74 forks source link

Change tmp file filename extension based on context #11

Closed subtleGradient closed 13 years ago

subtleGradient commented 14 years ago

When you switch languages in TextMate it remembers your language choice for that file extension.

So, if you set the filename extension based on the context, textmate will always remember which language you want to use to edit stuff from that context.

Obvious context would be the name of the application that it got the text from. e.g. Foo.CSSEdit would be mapped to CSS

Another awesome context would be the filename extension of the document that you got the text from. e.g. Edit in textmate from a BBEdit window with a JS file open would name the file Foo.bbedit.js

Yet another awesome context would be the domain name of the browser window that you got the text from. e.g. foo.gmail, foo.wikipedia, foo.random-bbforum, etc…

++ Awesomeness