<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>语法高亮 on 冯威的博客</title><link>https://fwhyy.com/tags/%E8%AF%AD%E6%B3%95%E9%AB%98%E4%BA%AE/</link><description>Recent content in 语法高亮 on 冯威的博客</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Tue, 22 Sep 2009 00:00:00 +0800</lastBuildDate><atom:link href="https://fwhyy.com/tags/%E8%AF%AD%E6%B3%95%E9%AB%98%E4%BA%AE/atom.xml" rel="self" type="application/rss+xml"/><item><title>Windows Live Writer中的语法高亮插件</title><link>https://fwhyy.com/2009/09/windows-live-writer-syntax-highlighting-in-the-plug-in/</link><pubDate>Tue, 22 Sep 2009 00:00:00 +0800</pubDate><guid>https://fwhyy.com/2009/09/windows-live-writer-syntax-highlighting-in-the-plug-in/</guid><description>&lt;h2 id="vspaste"&gt;VSPaste&lt;/h2&gt;
&lt;p&gt;该插件的作用是可以将 VS、 DELPHI 、VS STUDIO 6 、 SharpDevelop、Zend Studio 等IDE中的代码原样复制到Live Writer中。可以点击&lt;a href="http://files.cnblogs.com/oec2003/VSPaste.zip"&gt;此处&lt;/a&gt;下载，下载后解压，将dll文件复制到Live Writer安装目录中的Plugins目录中，如果是安装在C盘，路径如下：C:\Program Files\Windows Live\Writer\Plugins。&lt;/p&gt;
&lt;p&gt;从IDE中复制了代码后点击下图中红色标记处就可以将代码复制到Live Writer中&lt;/p&gt;
&lt;p&gt;&lt;img src="https://img.fwhyy.com/2022/202201290641313.webp" alt="2010-12-29_160715" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;h2 id="highlight4writer"&gt;highlight4writer&lt;/h2&gt;
&lt;p&gt;该插件安装后可以在一个弹出的对话框中选择c c# xml sql 等十几种语言，可以点击此处下载，下载后同样是将解压的文件复制到Plugins目录下，然后打开Live Writer可以看到如下图所示&lt;/p&gt;
&lt;p&gt;&lt;img src="https://img.fwhyy.com/2022/202201290641270.webp" alt="2010-12-29_160911" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;点击就会弹出输入代码的对话框，如下图&lt;/p&gt;
&lt;p&gt;&lt;img src="https://img.fwhyy.com/2022/202201290641466.webp" alt="2010-12-29_160950" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;就我个人感觉而言，使用第一种比较好些，因为第二种会产生很多的html代码，而第一种的html相对简洁，并且代码在一个class为Code的div中，可以自己设置css来改变代码部分的样式。&lt;/p&gt;
&lt;p&gt;下面是仿老赵的代码样式的css，打开博客园后台管理–》选项—》Configure ，在《通过css定制页面》下的文本框中加入下面的css样式&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;.Code{
 background: #F8F8EE;
 border-left:solid 3px #6CE26C;
 border-top:dashed 1px #BBBBBB;
 border-right:dashed 1px #BBBBBB;
 border-bottom:dashed 1px #BBBBBB;
 padding: 5px;
 margin: 0 5px 0 5px;
 font-family: Verdana,Helvetica, &amp;#34;微软雅黑&amp;#34; , Arial, &amp;#34;宋体&amp;#34;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;然后在文章中添加的代码效果如下：&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;public class Test
{
}
&lt;/code&gt;&lt;/pre&gt;</description></item></channel></rss>