When auto formatting (ctrl + k + d) html editor in VS2012 it is not removing blank lines. This used to work in VS2010. I looked in the Tools > Options > Text Editor > HTML > Formatting, but I didn't find anything to fix the issue. This was a handy feature when there was alot of html code. Does anyone know how to get this working in VS2012?
Below is a crude example. Ya, I know you can do this manually but auto formatting makes it easy.
<article>
<ul>
<li>Item 1
blank line
</li>
<li>Item 2
blank line
</li>
blank line
blank line
</ul>
blank line
blank line
blank line
<ul>
<li>Item 1</li>
blank line
blank line
blank line
<li>Item 2</li>
</ul>
</article>
Well it turns out that they removed this feature due to complaints. I had VS2010 Professional SP1 and it used to work. Here is a link from MSDN forums with explanation. MSDN Format Document
Related
New to the coding game, and familiarizing myself with Sublime Text and its plugins on Windows10.
After much searching, I finally figured out that v 3 and 4 do not offer the inherent ctrl+shift+g macro to wrap with abbreviation, so I manually binded those keys to that command:
{"keys": ["ctrl+shift+g"], "command": "emmet_wrap_with_abbreviation"},
The problem now is I can't get $$ for multiple lines to sequence, i.e. 01-07. It instead outputs 01-01.
For example:
Typed Monday-Sunday on separate lines. Shif+right-click highlight days to tag and wrap individual lines. ctrl+shift+g to bring up emmet wrap abbreviation command line.
In line typed li.day-$$>span
Output:
<li class="day-01"><span>Monday</span></li>
<li class="day-01"><span>Tuesday</span></li>
<li class="day-01"><span>Wednesday</span></li>
<li class="day-01"><span>Thursday</span></li>
<li class="day-01"><span>Friday</span></li>
<li class="day-01"><span>Saturday</span></li>
<li class="day-01"><span>Sunday</span></li>
But should have been:
<li class="day-01"><span>Monday</span></li>
<li class="day-02"><span>Tuesday</span></li>
<li class="day-03"><span>Wednesday</span></li>
<li class="day-04"><span>Thursday</span></li>
<li class="day-05"><span>Friday</span></li>
<li class="day-06"><span>Saturday</span></li>
<li class="day-07"><span>Sunday</span></li>
as it was in a tutorial I was watching. Although, the tutorial was from 2014, so it would have been an older version of Sublime as well as Emmet, if that matters. Additionally, since the binded keys performed the function of bringing up the wrap abbreviation command line, I suspect a function in the line itself, but I'm not sure what or why.
It looks like you’ve used multiple cursors to select each line individually then wrapped it with abbreviation. Instead, you should select text you want to wrap as a single selection.
Also, when wrapping multiline text, you should mark repeated element with *. In your case, abbreviation should look like this: li.day-$$*>span
https://docs.emmet.io/actions/wrap-with-abbreviation/#wrapping-individual-lines
I'm searching (for severals hours now) how to add an image to a page on my Jekyll website hosted by Github page.
I already read lots of post where solutions are given but none of them seems to work. However the Markdown syntax image is pretty clear...I don't see where I'm wrong ?
THE PROBLEM : My website only displays the line of code, but not the image ! As if Jekyll compilator considered this code like a normal text.
The syntax which is generally given is : ![My Title](http://url/to/img.png) (see more Here)
According to the forums which I have visited, the reccurent problem turns around the path to the image. Asbolute or not ? with a missed slash : "/" or with a bad use of liquid syntax {{site.url}} .
I've read all these posts, tested their solution and tried multiples combination with out any result!
Here is the basic markdown page I wrote:
---
layout: default
title: Catégories
menu: main
weight: 10
permalink: /categories/
---
<div>
<ul>
<li>
![Logo Jekyll]({{site.url}}/assets/images/categories/jekyll-logo.png )
</li>
<li>
![Logo Jekyll](http://memofil.github.io/assets/images/categories/jekyll-logo.png)
</li>
<li>
![Logo Jekyll]({{"/assets/images/categories/jekyll-logo.png"| absolute_url}})
</li>
<li>
![Logo Jekyll](/categories/jekyll-logo.png)
</li>
<li>
<img src="{{site.url}}/assets/images/categories/jekyll-logo.png" />
</li>
</ul>
</div>
and you can see on my website that the images are not displaying with the markdown syntax, but there is no problem with the classic html method (which leads me to think that it's not for me a url problem...). I also put my image at differents places on my repo to find a solution that's why the url is changing.
Is there anyone who had the same problem and solved it? The solution is probably so easy but I'm a newbie in Jekyll and I really don't see where is my mistake.
Thank you very much for your help !
The markdown syntax to add an image on jekyll website is not working because it is inside HTML tags, so when mixing HTML code with kramdown syntax and you want this kramdown code to be processed you need to specify it explicitely.
One way to do it isto add the markdown="1" attribute to the HTML tag, for example:
<ul>
<li markdown="1">
![Logo Jekyll]({{site.url}}/assets/images/categories/jekyll-logo.png )
</li>
</ul>
Look that there are no spaces before the kramdown code, or it will be interpreted as a block code.
For this particular case you can just use kramdown lists:
- ![Logo Jekyll]({{site.url}}/assets/images/categories/jekyll-logo.png )
- ![Logo Jekyll](http://memofil.github.io/assets/images/categories/jekyll-logo.png)
- ![Logo Jekyll]({{"/assets/images/categories/jekyll-logo.png"| absolute_url}})
- ![Logo Jekyll](/categories/jekyll-logo.png)
I'm trying to add Google Analytics click tracking events to li list items (active thumbnails) used in a responsive grid application, and can't get it working. I've researched here and in the Google developer forums without success. I'm sure there is something simple I'm doing wrong. I have the latest GA script code installed (page view analytics are working fine). Here is a code sample:
<ul>
<li data-type="link" data-url="http://www.dianagabaldon.com/books/outlander-series/" data-target="_self" >
</li>
<li data-thumbnail-path="outlander_files/thumbnails/outlanderbookseries1.png" ></li>
<li data-thumbnail-text >
<p class="largeLabel" >Diana Gabaldon - Outlander Series</p></li>
</ul>
Hope you can help. Feel free to suggest a better way of doing it.
Update: I'm still digging, and the GA code has been updated for Universal Analytics and looks like this:
<ul>
<li data-type="link" data-url="http://www.dianagabaldon.com/books/outlander-series/" data-target="_self" >
</li>
<li data-thumbnail-path="outlander_files/thumbnails/outlanderbookseries1.png" ></li>
<li data-thumbnail-text >
<p class="largeLabel" >Diana Gabaldon - Outlander Series</p></li>
</ul>
Update 2: I tried opening the outbound link target in a new page to see if a lack of callBack might be the problem. No success. Following are two views of the code, one with the contained inside the li with the outbound link, the other in a separate li with the same parent ul. Neither works. Does anyone know which syntax is correct? Thx.
Example 1: With href in it's own li:
<ul>
<li></li>
<li data-type="link" data-url="http://www.dianagabaldon.com/books/outlander-series/" data-target="_blank" ></li>
<li data-thumbnail-path="outlander_files/thumbnails/outlanderbookseries1.png" ></li>
<li data-thumbnail-text >
<p class="largeLabel" >Diana Gabaldon - Outlander Series</p></li>
</ul>
Example 2: With href inside outbound link li:
<ul>
<li data-type="link" data-url="http://www.starz.com/outlandercommunity/home.html" data-target="_blank" >
</li>
<li data-thumbnail-path="outlander_files/thumbnails/community1.png" ></li>
<li data-thumbnail-text >
<p class="largeLabel" >Starz: Outlander Community</p></li>
</ul>
The syntax you are using for the event tracking uses the classic GA syntax (_gaq.push), but if you are using Universal Analytics (assuming that is what you mean by using the "latest GA script code"), the syntax needs to be updated:
onClick="ga('send', 'event', 'GridLinks', 'Click', 'Outlander Clicks 1');"
I'm not familiar with Responsive Grid, but the likely explanation is that the call to ga only adds the event to a queue for asynchronous processing, and that the event is lost because the current document is immediately replaced afterwards (stopping the JavaScript execution for the current page). You would need to use a hit callback as described in the Google Analytics help, but I'm not sure how this would be integrated with Responsive Grid. Also note that there are a couple of other pitfalls you need to be aware of.
just a little one.
Visual studio's auto formatting takes the below line of code:
<li>All Catered Chalets</li>
and turns it into this line of code:
<li>
<a href=""
<?php print $directorylifts; ?>catered-chalets/index.php">All Catered Chalets
</a>
</li>
Note how it's inserted an extra quotation mark after the href= so the code no longer works.
I could just turn off the auto formatting but I find it helpful. Any ideas how to adjust it to stop this happening?
my files have the .php extension.
Thanks,
Phil.
I'm using TextMate and indentation isn't working as I'd expect - more specifically, it doesn't 'outdent' closing tags for me.
I create a new HTML file, I move the cursor down to the body section ... and I type
<ul>(newline)
It appropriately indents the next line for me so I build the following
<ul>
<li>hello
</li>
</ul>
Clearly, the closing tags "could" be outdented to line up with their start tags. I'm surprised TextMate doesn't do this automatically. Am I missing something? Sometimes I like to type my opening and closing tags and then fill-in the blanks ... but I keep getting this:
<div>
</div>
It indents correctly - but it doesn't understand that this is a closing tag -- which means I've got to move the cursor behind the closing tag and outdent it myself.