I am sure this may have been discussed earlier, but I would like to know what the current state of Templates (File / New from Template) is in TM2. I started experimenting with 2 over the weekend, after about a decade of using 1.x exclusively. That was my immediate "miss", as I typed out the complete structure of an HTML page (like an animal). Am I just looking in the wrong place for these?
Thanks,
Walter
I am sure this may have been discussed earlier, but I would like to know what the current state of Templates (File / New from Template) is in TM2. I started experimenting with 2 over the weekend, after about a decade of using 1.x exclusively. That was my immediate "miss", as I typed out the complete structure of an HTML page (like an animal). Am I just looking in the wrong place for these?
Why not just create a snippet with the structure of an HTML page?
On May 27, 2015, at 8:47 AM, Igor me@igorkozlov.me wrote:
I am sure this may have been discussed earlier, but I would like to know what the current state of Templates (File / New from Template) is in TM2. I started experimenting with 2 over the weekend, after about a decade of using 1.x exclusively. That was my immediate "miss", as I typed out the complete structure of an HTML page (like an animal). Am I just looking in the wrong place for these?
Why not just create a snippet with the structure of an HTML page?
How do you invoke such a snippet? Would this be a regular type + tab kind of thing? In TM 1.x, these templates were part of the bundle, but were invoked through the File New dialog. I am asking if this functionality and menu integration is gone, or I have my copy misconfigured and I cannot see it.
Walter
With a snippet, you create the snippet in the Bundle Editor and set the Tab Trigger to "!", then when you type "!" followed by a tab, you’d get the expanded version.
Why "!"? No good reason really, its just that I use the Emmet plugin and the shortcut for a base html page is "!" and then the expand key combo; Control + A.
You can get all sorts of different html templates, ! = html5, just search for "html" on the cheat sheet below for html4, strict or otherwise.
https://github.com/emmetio/Emmet.tmplugin http://docs.emmet.io/cheat-sheet/
Graham P Heath
On May 27, 2015 at 9:29:13 AM, Walter Lee Davis (waltd@wdstudio.com) wrote:
On May 27, 2015, at 8:47 AM, Igor me@igorkozlov.me wrote:
I am sure this may have been discussed earlier, but I would like to know what the current state of Templates (File / New from Template) is in TM2. I started experimenting with 2 over the weekend, after about a decade of using 1.x exclusively. That was my immediate "miss", as I typed out the complete structure of an HTML page (like an animal). Am I just looking in the wrong place for these?
Why not just create a snippet with the structure of an HTML page?
How do you invoke such a snippet? Would this be a regular type + tab kind of thing? In TM 1.x, these templates were part of the bundle, but were invoked through the File New dialog. I am asking if this functionality and menu integration is gone, or I have my copy misconfigured and I cannot see it.
Walter
_______________________________________________ textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On May 27, 2015, at 10:32 AM, Graham P Heath graham.p.heath@gmail.com wrote:
With a snippet, you create the snippet in the Bundle Editor and set the Tab Trigger to "!", then when you type "!" followed by a tab, you’d get the expanded version.
Why "!"? No good reason really, its just that I use the Emmet plugin and the shortcut for a base html page is "!" and then the expand key combo; Control + A.
You can get all sorts of different html templates, ! = html5, just search for "html" on the cheat sheet below for html4, strict or otherwise.
https://github.com/emmetio/Emmet.tmplugin http://docs.emmet.io/cheat-sheet/
Oh, thanks! That is just excellent. I need to read this cheat sheet -- I use Emmet as well.
Walter
Graham P Heath
On May 27, 2015 at 9:29:13 AM, Walter Lee Davis (waltd@wdstudio.com) wrote:
On May 27, 2015, at 8:47 AM, Igor me@igorkozlov.me wrote:
I am sure this may have been discussed earlier, but I would like to know what the current state of Templates (File / New from Template) is in TM2. I started experimenting with 2 over the weekend, after about a decade of using 1.x exclusively. That was my immediate "miss", as I typed out the complete structure of an HTML page (like an animal). Am I just looking in the wrong place for these?
Why not just create a snippet with the structure of an HTML page?
How do you invoke such a snippet? Would this be a regular type + tab kind of thing? In TM 1.x, these templates were part of the bundle, but were invoked through the File New dialog. I am asking if this functionality and menu integration is gone, or I have my copy misconfigured and I cannot see it.
Walter
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
I asked the same question when I migrated. I obviously appreciate the help we've received to create a temporary fix, but templates should really be a natural part of the software.
Walter, I have set it up, so whenever I press [tab] in a blank document, I get a HTML5 template, and the language is set to PHP. There is no better way to select language, so it is dependent on activated bundles. See screenshot for settings. Code below.
Rasmus
#!/usr/bin/osascript tell application "System Events" keystroke "p" using {control down, option down, shift down} keystroke "3" -- This is where it's messy. You might need to fix this shortcut "<!DOCTYPE html> <html lang="da"> <head> <meta charset="utf-8"> <title>$1</title> <meta name="description" content=""> <style type="text/css" media="screen"> *{margin:0;padding:0;} $2 </style> </head> <body> $0 </body> </html>" end tell
On 27/05/15 14.24, Walter Lee Davis wrote:
I am sure this may have been discussed earlier, but I would like to know what the current state of Templates (File / New from Template) is in TM2. I started experimenting with 2 over the weekend, after about a decade of using 1.x exclusively. That was my immediate "miss", as I typed out the complete structure of an HTML page (like an animal). Am I just looking in the wrong place for these?
Thanks,
Walter
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate