I am using sublime text for some time.
When I try to use the HTML tidy plugin to indent the html file I observe that all my newlines are automatically removed by it.
Is there a way to stop that? I don't want to remove the newlines thru the plugin. I could not find any setting which could do that for me.
Should i go for some other HTML formater?
Related
Sublime Text can highlight HTML. It can highlight Go. I would like to tell Sublime Text 3 to highlight the Go code in between the {{ and }} markers in my HTML to highlight in Go rather than as plain text.
There must be some way to combine the two. I thought surely one of the golang packages on Package Control would address this but I haven't found one that offers an HTML (Go) syntax like GitHub's Atom editor does by default.
The default highlighting packages will not correctly highlight your templates. You'll need to install Package Control and then install GoSublime.
Once you've done that, open your template file. Then click View > Syntax > GoSublime > GoSublime: HTML.
You should now have {{define "foo"}}{{end}} highlighted as Go and <p>foo</p> highlighted as HTML.
I'm using sublime text 3 and recently i'm facing indentation issue in multiple select indent. It only happen in javascript files or embeded javascript in html.
I've found the trick for that question. Ctrl+[ and Ctrl+] can be used as well for indentation but i want my tab key to behave like Ctrl+] just like Shift+tab does as Ctrl+[
I am trying to use a text editor (without using an IDE e.g. eclise/IntelliJ) where I can analyse an HTML file e.g. which tags are unevenly used and also format HTML documents in a way that it picks up each tag and organises so that the document is more human-friendly.
I currently have notepad++ and Sumblime Text 2 on my machine. If there is any specific plugin that helps to do the job, could someone please advise?
** REASONING **
I have a messaging service that uses email templates and one of these has a bug somewhere. It's generating a misaligned (i.e. odd) tag which can be visible if I was to put it in some audit trail (gets picked up in a tabular view). I would like to use a text editor to check the buggy tag.
KR,
In notepad++ you can do that if your open and closing tags are below eachother for example
<div>
something here
</div>
but if you have it inline like this
<div>something here</div>
you cannot do much with it.
Is this what you are asking?
Also if you want the vertical tab lines to be visible click on the "show indent guide" in the top toolbar
There are several online tools that can format the HTML for you. Do a quick Google search for "online html formatter" and try a couple out. Some will provide more options than others. Once formatted properly, it'll be human readable and probably be pretty easy to spot the stray tag.
Does sublime text3 has file path prompt?
for example :
<img> tag
src="img/apple/pic.jpg"
after img/ it can automatic prompt
Sublime Text does not come with these features preinstalled. However, it's very likely that a plugin such as this one (I haven't tried it) will solve your issue. If it's an image you use like all the time, you can make it a snippet if you'd like so you could type apic for example, press tab, and it would expand. Otherwise, try the plugin.
I have mostly worked in Adobe Dreamweaver (don't hate too much, I really like some of its feature that I'm about to mention). I'd really like to become proficient in Sublime Text 2. There are two things I'm looking to figure out:
When I start typing a tag and it auto suggests what it thinks I'm typing, I can hit tab or enter to auto-complete the tag. But when I do this, it makes the closing tag too. I hate this, because I go back to change things often, then when I tab to auto complete, it adds in the entire closing tag. So my question is can I make it ONLY auto-complete the opening tag when I hit tab or enter? (btw, I have emmet installed too)
My next question, if anyone is familiar with Dreamweaver, whenever I open an HTML file, it opens all corresponding files in a sub menu below the tab. So I open say, index.html, and below it appears, automatically, my css file, js file, and any files that I've put in the html file. With Sublime Text, I have to go to the trouble to open all those files with it. Is there any plugin or way to make Sublime replicate this?
Thanks so much for any help anyone can provide!
This is a bit old, and maybe you've discovered the answer, but for #1, you can set the "auto_complete_commit_on_tab" setting to true in your user settings.
http://www.sublimetext.com/docs/2/auto_complete.html