I downloaded the Textmate bundle for haml in Sublime Text 2 and did this (changing comment from / to correct -#):
http://www.sublimetext.com/forum/viewtopic.php?f=4&t=3995
Well, now Ctrl+/ will always give -# which is good. But I also want another shortcut key for / such as Ctrl-#. How do I do that in Sublime Text 2? Basically I want shortcut key for both / and -# for comment.
Thanks all!!
I haven't done this much myself, but I believe you'll want to edit the appropriate keymap file to create a new shortcut.
Sublime has some documentation on this here: http://sublimetext.info/docs/en/reference/key_bindings.html
Related
I have XML in Sublime Text 3 and I would like to use it as an example in Google Slides. The issue is when you copy the text you end up with plain text, I would like to keep the syntax highlighting as it makes it much easier to read. Is this possible? Is there some Sublime package I need?
Open the package control to install a package (Ctrl/Cmd + Shift + P):
Look for Highlight and click it:
Done! You can now right click some text and copy it as RTF:
Then you can paste that in Google Slides, PowerPoint, Word, Outlook, whatever you like.
I use CopyAsHtml pakage. It is better than SublimeHighlight pakage. You can install it according to what MS Berends said above.
CopyAsHtml pakage keeps sublime coloring exactly.
It will add another copy as HTML in your right click as you can see below.
Sublime has the ability to enter tags when typing the unbracketed word + TAB. Is there any way to recreate this functionality in Brackets? I went through their entire extension list but didn't see anything for this purpose.
What u want is "emmet" extension. It's actually in the extension list.
I'm trying to use jade, i am currently using sublime text 2, when i go to save my file there is no option to save as a jade file, Do i have to use something that can save as a jade file or can i use sublime and just save the file as file.jade. I seen this answer Syntax highlighting for Jade in Sublime Text 2? but, i am not understand what to do im on windows 8, i have never used github before and i see like 10 things i can click on when i click this link, https://github.com/miksago/jade-tmbundle i think i may rather use something from google chrome, i know they have a editor that supports jade. Anyone know of a good free editor or just something i can use to just save jade files.
Maybe you have to activate "file extensions" to do so, in older windows versions it was disabled on default.
To activate just open your explorer, hit view then, under options, click on folder options or something like that. There you find "Hide file extensions", deactivate this checkbox.
After that you can save files in Sublime in every format you want to, like #henguin1001 mentioned before.
You can just Save As -> then add the extension .jade, or rename your txt file with that extension and there is even a sublime text plugin for jade https://sublime.wbond.net/packages/Jade
I tried this IDE and I like it. Only problem is that if Im in a project that has some PHP in it, its confusing to see plain black text instead of correct PHP highlight.
I dont need brutal PHP autocomplete or so, but a syntax highlight. Is it possible to achieve in Webstorm?
Or the only option is to use PHPStorm?
Why not
File Menu > Settings > File Types > click 'PHP files' > click 'Add' in the bottom screen > enter '*.php'
(instead of html with .php)
Associate the .php file extension to HTML file cause the IDE highlight at least HTML code correctly.
File Menu > Settings > File Types > click 'HTML files' > click 'Add' in the bottom screen > enter '*.php'.
UPDATE: since TextMate bundles support was added to the IDE, you can add any language syntax highlighting to the IDE if there is TextMate bundle for it. See my reply about adding Ruby highlighting, it would be the same for PHP, just the different bundle.
Your best option is to use PhpStorm. Another option is to create your custom file type for basic syntax highlighting.
A late reply, but this worked for me:
use this textmate bundle: https://github.com/textmate/php.tmbundle
Then go to settings > File Types and associate *.php to PHP files.
Hope it helps.
I tried the textmate bundle but it seems that there is an issue. I wasn't able to get highlighting. I think it is an unsolved bug, so I wonder if someone figured out how to use it.
http://youtrack.jetbrains.com/issue/WEB-11065
http://youtrack.jetbrains.com/issue/RUBY-14273
So I think I have to use PHPStorm to get basic syntax highlighting. Thats sad :/
This questions describes how to install textmate plugin which gives you syntax highlighting:
Is it possible to get Ruby syntax highlighting in PHPStorm?
The only difference is that you want to use this bundle: https://github.com/textmate/php.tmbundle
(but maybe there are better ones)
Like in Eclipse or Aptana, you have a interface for create snippets and shortcuts for them.
But, in Sublime Text 2, just have a .py file.
Anyone know how I can do that?
Sorry for my english, I'm Brazilian.
Maybe this can help:
http://net.tutsplus.com/tutorials/tools-and-tips/sexy-code-snippet-management-with-gists/
It's about setting up Gists on GitHub and using it as a snippet library through Sublime Text.
There are lots of other tips on Sublime Text on net.tutsplus.com too.