Is there a way to have javascript block correctly displayed in Visual Studio when handling riot?
So we can use intelisence and all other neat features?
I've tried using <script type="text/javascript>` but that didn't help... what do you guys do?
Cause it's pretty bad every time we paste something in the <script> context, it re-formats everything to the left ... every single time :/
Turned out to be really simple...
Search in the Quick Launch (Ctrl + Q) [top-right of Visual Studio] for File Extensions and add a new extension for:
tag --> HTML Editor
Related
I have noticed that web essentials for visual studio creates a .css.map file when compiling less. Does this mean it is possible to navigate from a selector in the css file back to the selector in the associated less file? If so how?
Yes, the idea of source maps is to map code or css from a compressed file back to the original uncompressed version.
Here is a good guide to using source maps in Chrome and Firefox.
An introduction to source maps
In VS 2013, if you enable LESS preview window, you can leverage Go To Definition command on a selector in preview to highlight the corresponding selector in LESS source. (via right-click context menu or press F12 in preview window -- see #809). When applicable, it will also load the #imported document, where the source is available.
On that note, there are precession issues with libsass' source-map. For that matter, it doesn't work well in SCSS editor.
i'Ve installed web essentials 2012 for VS2012.
But it seems it doesen't support zen coding for css??
or am i missing something??
please help..
thanks.
Web Essentials only supports ZenCoding for HTML. I decided to wait with the CSS implementation because of the CSS editors rich Intellisense and snippet support. They would most likely conflict with ZenCoding
Here's a sample to try :
h1{Good Example}#test.classname+#sibling1{div sibling1 text}+#sibling2{div sibling2 text}+h2{header2 text}+ul>li>a[href="http://stackoverflow.com"]{stackoverflow link}^li>a[href="http://codeproject.com"]{codeproject link}
Hit [TAB] Key to Expand
Remember to hit [tab] key after typing the sample, to expand the zen code to real HTML.
The sample above will expand to the following:
It will render in the browser to look like this:
I have both dreamweaver CS5.5 and Visual Studio Ultimate 2010. Both programs I love, but I really want a way to complete all of my front end coding in Dreamweaver, and then work with the database in VS.Net.
I have been completing this by making all of the pages in VS.Net, and then clicking 'open with' Dreamweaver afterwards. Although each time I open the .master file with Dreamweaver it collapses into blank coding, propbably because it doesn't recognise it. I have researched this before,and tried to solve the problem by adding content to the documentType folder but nothing has happened. I really need some support in Dreamweaver because I am alsways changing the design of my pages, and each page uses a materpage file.
The other problem is the masterpage uses .swf files and javascript alot, which is a pain to use in VS.Net, as the code hinting doesn't work properly.
Does anyone have a solution to this problem?
I havent tested it yet, but take a look at this: http://alexle.net/archives/119
Go to **[Your_Drive_Here]:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration**
Open the file Extensions.txt and add your custom extensions to the list.
...
Go to the DocumentTypes folder (still in the same path), edit the file MMDocumentTypes.xml\ (fullpath: [Your_Drive_Here]:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration**DocumentTypes\MMDocumentTypes.xml**) with a Text Editor (i.e. Notepad or Notepad++). It’s not advisible to edit this particular xml file with Dreamweaver as the software may go crazy as it’s being used to edit itself.
Go to l*ine 67*, add the THTML extesion to the winfileextension and macfileextensionlist attributes. Here is the code exerpt
This instructions are for Dreamweaver MX 2004, but may work changing Macromedia\Dreamweaver MX 2004 for Adobe\Adobe Dreamweaver CS5.5 (I don't have CS5.5, but assuming this had not changed until CS4 (my version), it will be there.
IntelliSense does not work in Visual Studio 2010 if you are inside of a <script> tag and try to use #Html.. Anyone know how to enable or fix that?
Please note: This is not for javascript, jQuery, or similar, IntelliSense-enabling which is possible.
This appears to be a bug/complexity resulting from hosting JavaScript inside the HTML editor: http://aspnet.uservoice.com/forums/41199-general-asp-net/suggestions/2706979-improve-the-razor-intellisense-inside-script-block
It doesn't look like it will be resolved anytime soon.
Just a quick suggestion, separate JavaScript and Razor like I described here:
https://stackoverflow.com/a/11109799/538387
I have a lot of templates that are enclosed within script tags. They are pure html, but Visual Studio grays them out. I don't have any in-line Javascript so if Visual Studio simply ignored the script tag and treated the contents inside as it would a normal html document would be really nice. I've grown accustomed to CSS class intellisense and nice code formatting.
This is a long shot, anyway this is possible? Right now I'm marking up my HTML then putting it within the script tag, but was hoping for a better solution.
You can insert a space after the opening bracket of the opening SCRIPT tag to enable HTML IDE support and when your done, just remove the space.
< script>
^leave space
<div>HTML is supported</div>
</script>
<script>
^no space
<div>HTML is NOT supported here</div>
</script>