Windows Live Writer 的代码高亮插件
2010-01-18 22:54
363 查看
一直觉得51CTO的blog需要很好的改进,只不过现在还没有改~~嘻嘻,发点牢骚啦~~至今仍然没有在代码高亮里面找到C++的身影,代码高亮组件也不大漂亮。博客编辑也对Opera等非IE内核的浏览器有些兼容问题,主要是在图片添加那里。当添加了第一个图片之后,再想添加第二个就不可能了,因为那个对话框已经出不来了。反正在我这里是这个样子。还有一个问题是发表文章时不能自动保存,有时候不注意点了关闭,就已经前功尽弃了…唉唉,好可怜~~
近来发现使用Windows Live Writer还是比较方便的,这就没有了不能自动保存的缺陷。然而,美中不足之处在于不能添加代码高亮显示的功能。这对一个技术博客来说真是致命的。于是找了很长时间,试过N种插件,今天终于找到一个可以使用的。下面来看一个C++的例子:
1 class CurrencyModel : public QAbstractTableModel
2 {
3 public:
4 CurrencyModel(QObject *parent = 0);
5 void setCurrencyMap(const QMap<QString, double> &map);
6 int rowCount(const QModelIndex &parent) const;
7 int columnCount(const QModelIndex &parent) const;
8 QVariant data(const QModelIndex &index, int role) const;
9 QVariant headerData(int section, Qt::Orientation orientation, int role) const;
10 private:
11 QString currencyAt(int offset) const;
12 QMap<QString, double> currencyMap;
13 };
怎么样?还可以吧?不过美中不足之处是直接复制代码的话会把前面的行号一起复制下来…唉唉,如果你的编辑器有正则表达式的替换功能,这个自然是不在话下,如果没有的话…可就有的受了…唉唉,还是要找一个两全其美的办法啊…
最下面已经把相关插件传上来了,我会把它放到下载区去,先这么凑活着用吧~~
不过使用这个插件的话,博客的页面就撑开了,看来还是不行啊!
附件:http://down.51cto.com/data/2355000
近来发现使用Windows Live Writer还是比较方便的,这就没有了不能自动保存的缺陷。然而,美中不足之处在于不能添加代码高亮显示的功能。这对一个技术博客来说真是致命的。于是找了很长时间,试过N种插件,今天终于找到一个可以使用的。下面来看一个C++的例子:
1 class CurrencyModel : public QAbstractTableModel
2 {
3 public:
4 CurrencyModel(QObject *parent = 0);
5 void setCurrencyMap(const QMap<QString, double> &map);
6 int rowCount(const QModelIndex &parent) const;
7 int columnCount(const QModelIndex &parent) const;
8 QVariant data(const QModelIndex &index, int role) const;
9 QVariant headerData(int section, Qt::Orientation orientation, int role) const;
10 private:
11 QString currencyAt(int offset) const;
12 QMap<QString, double> currencyMap;
13 };
怎么样?还可以吧?不过美中不足之处是直接复制代码的话会把前面的行号一起复制下来…唉唉,如果你的编辑器有正则表达式的替换功能,这个自然是不在话下,如果没有的话…可就有的受了…唉唉,还是要找一个两全其美的办法啊…
最下面已经把相关插件传上来了,我会把它放到下载区去,先这么凑活着用吧~~
不过使用这个插件的话,博客的页面就撑开了,看来还是不行啊!
附件:http://down.51cto.com/data/2355000
相关文章推荐
- 新语言代码高亮及Windows Live Writer插件开发
- Windows Live Writer代码高亮插件对比
- 使用 Windows Live Writer 代码高亮插件
- Windows Live Writer 代码高亮语法插件中文版
- 重新修正的Windows Live Writer代码高亮插件VSPaste
- Windows Live Writer 代码编辑插件Coder High Light
- windows live writer 向51CTO插入代码插件比较
- Windows Live Writer插件:在WLW中插入语法高亮代码(二)
- Windows Live Writer插入代码vs2010插件
- Windows Live Writer代码插件测试
- Windows Live Writer的一个代码语法高亮的插件——CodeInLiveWriter
- Windows Live Writer 各种代码插件的显示效果比对
- 使用cf.SyntaxHighighter作为Windows Live Writer 2011的插件发布Python代码到博客园
- Windows Live Writer 代码高亮显示对比
- Windows Live Writer 代码插件改造
- 博客园新语言代码高亮以及OpenLiveWriter插件开发(一)
- Windows Live Writer代码插件测试
- Windows Live Writer代码插件瞎搞未遂
- Windows Live Writer 实现代码高亮
- 博客园配置windows live writer,实现本地代码高亮