How do I program different languages in Sublime Text? - sublimetext2

I recently downloaded Sublime Text, but I could only find 9 languages, all of which I don't program. I would like to code HTML, CSS, and JavaScript, and I would like to know how to add these build systems onto my computer.

SublimeText is just a text editor with some 'extra bits' plugged in.
HTML, CSS and JavaScript aren't compiled languages, so you don't need a compiler, just save the file with the correct extention (.html, .cs or .js).
For syntax highlighting, click the box on the far right of the status bar, it'll list some languages that SublimeText knows about, including those three and will helpfully provide syntax colouring and formatting to help you along.

Sublime text is only a text editor. As for HTML, CSS, and JS, those are all present in sublime, and don't require a build system, just a web browser.
If you want to use those languages, use shift-command(control?)-p to open the command pallet and type sshtml, sscss, ssjavascript, etc. to set the syntax highlighting.
To run it, simply open the HTML file in your browser, and reload the page if you've made changes.

Related

Atom editor custom made file template

I currently use ATOM as my text editor for HTML files and etc. My headers, nav bar, and footer are usually all the same. Is there a way or package that I can install that will allow me to have this autocomplete as a shortcut for any HTML file that I am working on?
Example:
I open an atom file
Save as HTML
Type in a button or do something
Page will have all my custom made HTML code
That way I don't have to re-entering it or etc.
To do this in Atom, you're probably looking for the snippets feature. This lets you auto-insert arbitrary content as you need, and you can specify your own snippets - like your standard header, footer etc. You can even create shortcuts so your snippets are automatically expanded.
Once you've found the snippets feature, do let us know if you have any problems getting it to do exactly what you need. Most text editors will have something similar - it's a common use case.

How can I add HTML code with notepad without installing an IDE

I am a starter in programming. One of my friends told me that I can start programing without installing any app and that I need only notepad to start learning HTML. The thing I can't find out is how I actually make it work. I inputted the code he gave me and I also made sure there where no typos, but then after I saved it I can not open it as a local file. I have only been able to open it as a text document so I can only see the code.
For this you have to save the file you are working on with the extension: .html. Then you have to open it with a browser, and you will see there the content of it
you can create a notepad and save it as name.html (not as .txt)
write the code inside it.
You can start with the notepad software. Unfortunately, this is not the best option. In fact, specialized software is recommended. Thanks to them, you will be able to write code faster thanks to the suggestions made by the software or to the very useful shortcuts! If you want to use this software, I recommend you one of the best on the market: Visual Studio Code.
If however you want to stay with notepad, you just have to click on "File" > "Save as" and to choose the type of file you want. In your case, it will be .html (Hypertext Markup Language)
You can create a file called [filename].html, and right click on it to open it in notepad. After Editing the file and adding your code to it, you can double click on it and it will open in your browser.
If you start enjoying to code, getting an IDE will make it much better. Visual Studio Code is recommended for this as it is user friendly and won't take up much storage space :)
code.visualstudio.com - Visual Studio Code
After saving the HTML code save it as filename.html, make sure that file extension is .html otherwise the filesystem will not recognized it.
Then right click on the file and open it with chrome or whatever browser you have and it will work, else open browser and drag it to browser and drop it, your html page will open in browser.

How do I copy html, css, Javascript code from email

I am trying to copy code from an email into a a Web page file. I would like the file to have functionality.
I tried copying it directly into a new Sublime file but the colors did not appear as if I had typed it in. When I right clicked background, no open in browser option appeared. I am experimenting with code snippets in blogs and having problems pasting code with functionality in tact. Is this an extension omission ?
Thanks
Sublime will copy plain text, a wysiwyg html editor will copy the markup. If you want to get the markup, do 'show original' (gmail) or whatever your client has as an equivalent. The original will have the markup and can be copied into Sublime. Hope that helps.

simple code editor with snippets panel?

I use Webstorm as my IDE and Brackets for some quicker stuff.
Is there a light weight editor similar to brackets that has a snippets panel like Dreamweaver? or maybe one that has a plug in or extension that adds a snippets panel?
I'm familiar with live templates in Webstorm but I don't believe there is a way to have a list of them in a panel that is always visible. I much prefer to have a big panel of commonly used blocks of code and html tags that are always visible that I can just click on.
Thanks for the help.
Windows Only:
Notepad++ has a a snippet plug in which does the same thing. After installing Notepad++ you simply click the Plugin menu -> Plugin Manager. The tick snippets and press install. The rest is done for you.
Alternatives:
Sublime Text has a snippet tool but it's not the same as as Dreamweavers snippet panel.

just wanna highlight some texts when use a browser to view local html

A lot of tutorials which can be downloaded have the file type of .chm, .pdf, .html, etc. I downloaded a Java SE tutorial of Java SE in HTML format. When I use chrome to view it and everything is good. But I just wonder how could I just directly highlight some useful information (e.g. text) when I use chrome to view it? The html files are local, I know that I could use some software to edit it, like using HTML tag <font color:> etc.
But I just want to highlight it directly in the browser like editing it in word. Is there any suggestion? Dose chrome support such kind of plugin? If you still don't understand what i mean, please refer to "clip to evernote", which is a plugin of chrome and can cut the pages and upload them to the evernote server. when I use evernote client to read them, I can directly highlight some words which is useful to me.
It's much more a SuperUser question, but ... There is a lot of plugins for highlighting web pages out there. You could try Yawas or Simple Highlighter
edit: ok, I think I understood better your problem ... Yawas, Simple Highlighter, as well as most other highlighters, don't hightlight on local pages.
I'm not sure there is such an highlighter available for Chrome, then. What I would suggest is to try opening you documentations with Amaya instead of Chrome. It's both the Browser and the Editor from the W3C; and since it has both functionalities, you probably will be able to do what you want on your local pages.
You can save it to your computer by clicking "Open a new tab containing a list of highlights and notes on just this page". Then you can save only the html contents to your computer with the name as you like. Don't try to use ALT to save the list of note because you will never see the contents what you want to save.