用Live Writer写博文插入程序代码的三个插件比较

用Live Writer写博文时有三个插件插件可用于插入程序代码:

插件1:  Insert Code for Windows Live Writer

      下载地址:http://plugins.live.com/writer/detail/insert-code-for-windows-live-writer

该插件用起来最简单,但支持的高亮语言太少。

插件2:   Code Formatter for Windows Live Writer

下载地址:http://plugins.live.com/writer/detail/code-formatter-for-windows-live-writer

具体使用方法可参见 迷途d书童博文“Live Writer 在oschina上的代码高亮插件推荐”

该插件功能很强,支持如下语言。

image

插件3:Source Code Formatter

下载地址:http://plugins.live.com/writer/detail/source-code-formatter

该插件功能也很强,可以加边框,支持如下语言高亮

image

有趣的是插件2和3支持的语言有互补性。

插件三的按装何使用步骤:

(1) 下载按装文件“WLWSourceCodePluginSetup”后,双击自动按装到你的Live Writer.

image

我三个全装了,故有三个选项

(2) 点第三个Source code启动插件

    image

左边是代码窗口,右边是效果预览。

插件3的插入效果如下:

  1: #include <stdio.h>
  2: #include <stdlib.h>
  3: main()
  4: {
  5:    int n,i;
  6:    float *pa;
  7:    printf("Input an integer n: ");
  8:    scanf("%d",&n);
  9:    pa=(float *)calloc(n,sizeof(float));   
 10:    for(i=0;i<n;i++) 
 11:    {
 12:       *(pa+i)=7.7+i;
 13:    }
 14:    for(i=0;i<n;i++) 
 15:    {
 16:       printf("%f\t",*(pa+i));
 17:    }
 18:    free(pa); 
 19: }

你可能感兴趣的:(代码,code,插件,live,Writer)