Web Essentials 2013 markdown editor - image paths - web-essentials

I haven't been able to find much/any documentation on the functionality of this feature of web essentials 2013.
Is it possible to use relative image paths with the web essentials markdown preview? Also, what about linking from one markdown file to another - any support for that?

The Markdown functionality in Web Essentials 2013 is provided via the MarkdownSharp library so any support for image paths etc will be according to MarkdownSharp's implementation, which is the same as the support you get here on StackOverflow.
You can certainly specify a relative path to an image (however the preview pane in Visual Studio 2013 won't be able to show it):
![a lazy cat](img/cat.jpg)
The reason the image won't show in the Preview in VS is because the embedded WebBrowser used to show the preview, doesn't actually render the saved .html file, but just renders the generated HTML from a string, so it's not relative to the source .md file... See the StartCompiler method in the code.
The Markdown specification doesn't have a special syntax for linking from one page to another (aka "wiki links").
The source code for Web Essentials 2013 is on GitHub: github.com/madskristensen/WebEssentials2013

Related

How to set the language a plain text is read as in Visual Studio

I've been using Notepad++ for editing CSS, and for just plain text. In Notepad++ I can paste a block of text and specify if I want the file to be highlighted as HTML, CSS, etc.
How do I set the language that Visual Studio will use to interpret a block of text I pasted from my clipboard? What about when I open a plain TXT file?
Am I using the wrong tool for the job? I've been hearing about "Visual Studio Code". Is that what I should use instead?
In general, Visual Studio works with "Project". It is designed to work with the relevant files for the project, and it will recognize them according to the extension.
In Visual Studio, you can override the default config for the file extension with this docs.microsoft. This configuration will work against all files with this extension, but not against a specific file.
I guess there are plugins that can help on the subject, but as you said, Visual Studio Code is more like a file editor like Notepad++, with very powerful plugins and capabilities. So yes, in case you want an enhanced Notepad++, you need to use the Visual Studio Code and not the Visual Studio.
After using both Visual Studio and Visual Studio Code I can confidently tell you VS Code is so much swifter to open and use while also being very easy to navigate.
VS Code automatically detects the language of your code but you can also switch languages by clicking on the existing language at the bottom.
I highly recommend you use it: https://code.visualstudio.com/

Can I specify which cultures to use when generating local resource files?

I am working on a website that is English by default and optionally in Spanish. I am generating local resource files for each page with language appropriate content for various items.
So far to create my pair of resource files (default and Spanish) for each page, visual studio 2010 generates the first file like default.aspx.resx. I create the Spanish version manually by copying the default file and renaming to default.aspx.es.resx.
Is there a way to have visual studio generate both files for me? I can generate the default file, add controls to the page, and generate again and visual studio is smart to not blow away any work I've done in that file. I would like to be able to also update the Spanish resource file automatically.
There is no tool in Visual Studio (at least I haven't found one when researching the same request), and we dropped the idea of writing smart macros for that purpose that parse resx files and modify other based on changes.
There is, however, a decent free tool that supports creating and aligning resources: Zeta Resource Editor.
You can add files and entries on click, and editing resources is much nicer than in Visual Studio, in addition to quite a few other useful features.

Drupal 6 Using SWF Tools to display an .swf files

I'm trying to display an .swf file (with an accompanying .flv file) using SWF Tools, which I understand is possible.
So far, I have:
Created the field "video".
Enabled the SWF Tools module (version 6.25).
At this point, I'm really stuck. I created a block in Views, but it only displays an anchor link to the .swf file. I've read "Installing SWF Tools" (http://drupal.org/node/303203) but don't really understand it.
I'm hoping for some simple directions so I can get this finished and move on.
You need to enable the swf tools filter for your input format.

Open a file in Visual Studio's CSS Source Editor

I am using Phil Haack's T4CSS T4 template based on .less
One bad thing about Phil's solution is that visual studio opens the .less files as plain text files rather than as css files. (Thus no intellisense.)
How can I get VS to open a .less file in the CSS Source Editor?
I've tried:
Right Click > Open With, but the CSS Source Editor isn't listed.
Tools > Options > Text Editor > File Extensions, but once again, CSS Source Editor isn't listed.
Can this be done?
I just posted an extension that does this; you can download it from the Visual Studio Gallery.
The key to the extension is the .pkgdef file:
[$RootKey$\Languages\File Extensions\.less]
#="{A764E898-518D-11d2-9A89-00C04F79EFC3}"
[$RootKey$\Editors\{A764E89A-518D-11d2-9A89-00C04F79EFC3}\Extensions]
"less"=dword:00000028
Note that this extension doesn't do anything to help the CSS language service support Less; nested rules, for example, don't work very well at all (it confuses the CSS language service).
Midscape's Web Workbench Visual Studio Extension adds support for .less files, including syntax highlighting and Intellisense. It also adds support for SASS and CoffeeScript.
If you are using the dotless.Compiler.exe tool (as opposed to the http handler), there is nothing to say your files have to end with .less. I name my suffix my .less files with .css so that Visual Studio treats them like css files. E.g. my naming convention is:
/css/common.less.css ==> /css/common.css
I run the dotLess compiler as a post-build event, e.g.
$(SolutionDir)\packages\dotless.1.1.0\Tools\dotless.Compiler.exe "$(ProjectDir)\css\common.less.css" "$(ProjectDir)\css\common.css"
How to turn on Visual Studio 2010 .css Intellisense on .less file

Is it possible to suppress the Web Forms Designer in Visual Studio from being opened?

The primary reason for asking how to do this is because I personally never use it. The Designer is slow to load... especially on complex pages with lots of controls. To put it bluntly, I think of it as a crutch that web developers should avoid.
I would like to encourage team members to avoid using it as well. If there is a way to do this through a policy setting (either in TFS or otherwise) or some options when installing Visual Studio that would be even better.
Go to
Tools Menu
-> Options
-> HTML Designer
The first groupbox is "Start pages in". Setting it to Source View should accomplish what you are looking for within VS.
Thank you for all the helpful answers. What I ended up doing was setting the default view from Tools -> Options -> HTML Designer - Start Pages In = Source View (as suggested by #blu). Then I exported my Visual Studio settings to a file. The snippet below is an abstract of the relevant section. This can be saved as a .vssetings file and imported by team members as part of our standard setup:
<UserSettings>
<ApplicationIdentity version="9.0"/>
<ToolsOptions>
<ToolsOptionsCategory name="TextEditor" RegisteredName="TextEditor">
<ToolsOptionsSubCategory name="HTML Specific" RegisteredName="HTML Specific" PackageName="Visual Studio HTM Editor Package">
<PropertyValue name="StartPageView">1</PropertyValue>
</ToolsOptionsSubCategory>
</ToolsOptionsCategory>
</ToolsOptions>
</UserSettings>
It's a per-user setting, by right clicking on the .CS file for the form and saying "Open With...", then changing the default editor for that type.
AFAIK, there is no way to force that setting via TFS.
There is no way to suppress the Editor directly, as it is part of Visual Studio. The Visual Studio 2008 is a much improved editor, as it is the same one used in Expression Web and I often use it. Also the source view is part of the Editor from what I remember.
There is an option in VS Settings to always open ASPX pages in Source View however:
Tools
Options
Web Browser
View source in
You can also specify an external editor. There is no way to suppress the designer using TFS or a GPO however.
I think so. In the Solution Explorer, right-click the an aspx or ascx file and choose Open With. When you choose the editor you want you can set it as default.

Resources