cTotalCMD Total Commander启动器

特性

1.设置Total Commander(简称TC)为默认文件管理器。
2.回收站、控制面板使用系统默认文件管理器打开。
3.从外部打开时,防止TC重复打开标签。感谢@sunwind兄提供思路
4.从外部打开时,按住shift在右侧激活,否则左侧。

注意

本工具仅支持win7,XP请参见@sunwind的日志

用法

cTotalCMD.exe cTotalCMD.install.exe放在TC目录中
运行cTotalCMD.install.exe

下载

https://github.com/likaci/cToalCMD

Vim2Ahk Vim下的AutoHotKey IDE环境

特性

F5 运行
F6 停止
F7 编译
F8 打开taglist 等
错误信息输出在vim窗口
代码补全
代码提示 *编辑模式下 F1
Alt-F1 查询光标处help.chm
ahk Snippet补全
ahk taglist

To do

<del>当脚本运行时信息窗口提示Running</del>
解决中文和特殊字符脚本无法运行
同时编辑多个脚本时F5 F6混乱
替换文件管理器为NERDTree
运行和停止统一为F5
代码提示做成弹出菜单的形式
增加Debug功能

安装

1.建议路径是 d:\Vim\

即 d:\
    |-vim\
    |    |-vim73\
    |    |-vimfile\
    |    |-BackupDir\
    |    |-Dict\

2.配置ctags

如果使用taglist可以省略以下
ctags.cnf 放到$HOME中,win7默认为 c:\Users\用户名\ ,可以在vim中 :ec $HOME 获取路径
ctags.exe 放到环境变量的path中 比如c:\windows

3编辑vimrc

编辑vimrc,根据实际情况配置,路径中尽量不要使用空格和中文
62let g:AhkSIDE_AhkChm = 'd:\AutoHotKeyL\AutoHotkey.chm'
63let g:AhkSIDE_AhkExe = 'd:\AutoHotKeyL\AutoHotkeyA32.exe'
316let Tlist_Ctags_Cmd = 'D:\Vim\vim73\ctags.exe'

完成后即可

预设快捷键

F1 编辑状态下  代码提示
    alt-F1 查询帮助chm
F2 隐藏显示菜单栏
F4 跳转到错误
F5 运行
F6 结束运行
F7 编译
F8 打开taglis等
F9 生成tags

其他快捷键

leader设置为","
,c 关闭当前窗口
,o 关闭其他窗口
,b 新建窗口
,n 下个窗口

gc 关闭当前tab
go 关闭其他tab
gb 新建tab
gn 下个tab

,e 编辑vimrc
,s 重载vimrc
,ww 保存文件
,wf 强制保存
,qq 退出/关闭窗口
,qa 退出所有

再其他的快捷键见vimrc


感谢

感谢SunwindArray 的指点
还有AhkSIDE作者Loaxs
有幸如果作者能看见一定要联系我likaci(a)qq.com
最主要的功能全部有AhkSIDE实现,我只是稍作修改后各个插件的堆砌,修改后的ahkside在bundle\AhkSIDE\ 中
还有vim作者,各位插件作者

预览

下载

vim2ahk

Hexo多说评论jQuery版本

上文介绍了为hexo添加多说评论,用的是原生js方式,需要外挂一个js文件,十分啰嗦。
参考了jQuery的帮助文档,发现用jQuery更方便、简洁。
comment.ejs全文如下,其中<!--likaci xxx -->之间部分为添加内容,具体效果参见下方评论框。

<% if (config.disqus_shortname && page.comments){ %>
<!--likaci js init begin-->
<script type="text/javascript"> 
$(document).ready(function(){
   $("#Disqus_bt").mouseover(function(){
     $("#Disqus_bt").css("background-color","#E6EFC2")
     $("#duoshuo_bt").css("background-color","#f5f5f5")
     $(".ds-thread").animate({ height: 'hide', opacity: 'hide' }, 'slow');
     $("#disqus_thread").animate({ height: 'show', opacity: 'show' }, 'slow');
   });
   $("#duoshuo_bt").mouseover(function(){
     $("#Disqus_bt").css("background-color","#f5f5f5")
     $("#duoshuo_bt").css("background-color","#DFF4FF")
     $(".ds-thread").animate({ height: 'show', opacity: 'show' }, 'slow');
     $("#disqus_thread").animate({ height: 'hide', opacity: 'hide' }, 'slow');
   });
});
</script> 
<!--likaic js init end-->
<!--likaci css style begin-->
<style type="text/css">
#Disqus_bt,#duoshuo_bt { padding: 5px 10px 5px 7px; line-height: 17px; display: block; float: left; margin: 0 0 0 9px; background-color: #f5f5f5; border: 1px solid #dedede; border-top: 1px solid #eee; border-left: 1px solid #eee; }
#Disqus_bt{color: #336699}
#duoshuo_bt{color: #d12f19}
</style>
<!--likaci css style end-->
<section id="comment">
  <h1 class="title" style="float:left"><%= __('comment') %></h1>
  <div id="duoshuo_bt" >多说</div>
  <div id="Disqus_bt" >Disqus</div>
  <div style="clear:both"></div>
  <div id="disqus_thread" style="display:none">
    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  </div>
<!--likaci add duoshuo begin-->
    <div class="ds-thread"></div>
    <script type="text/javascript">
    var duoshuoQuery = {short_name:"yourshortname"};
    (function() {
        var ds = document.createElement('script');
        ds.type = 'text/javascript';ds.async = true;
        ds.src = 'http://static.duoshuo.com/embed.js';
        ds.charset = 'UTF-8';
        (document.getElementsByTagName('head')[0] 
        || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
    </script>
<!--likaci add duoshuo end-->
</section>
<% } %>

为hexo添加多说评论

hexo是基于Node.js的静态博客程序,可以方便的生成静态网页托管在github pages服务上,值得一提的是作者是台湾同胞。
hexo是在对比安装了所有可以安装的静态博客引擎之后的选择,octopress pelican liquidluke……
各种引擎并优劣之说,个个都是作者辛苦劳动的结晶,对于平台的选择完全在于个人的喜好。

###添加多说的原因
由于hexo是静态博客引擎,所以评论只能通过js加载外部网页实现。
hexo原生支持Disqus,但Disqus只支持G+ twitter等登陆,不符合兲朝的大国情,所以只能自己动手加。
另外多说好像口碑不太好……

###安装
代码的安装很简单,只需要修改

\hexo\themes\light\layout\_partial\comment.ejs

如果只打算使用多说,可以直接把Disqus部分删掉,加上获取的代码即可。
而打算同时使用Disqus和多说的同学可以参考以下代码,所有以<!--liakc xxxx begin end-->注释为添加的部分。
修改得不好,应该可以更模块化一下,就不提交到git上献丑了。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 <% if (config.disqus_shortname && page.comments){ %>
<!--likaci tab.js init begin-->
<script type="text/javascript" src="/js/tab.js"></script>
<script type="text/javascript">
window.onload=function(){
var tabtype={trigger:'mouseover',tabCurrentClass:'newclass',auto:false,timer:4000,delay:300 };
tabInit(tabtype,['Disqus_bt','disqus_thread'],['duoshuo_bt','ds-thread'])
}
</script>
<!--likaic tab.js init end-->
<!--likaci css style begin-->
<style type="text/css">
#Disqus_bt,#duoshuo_bt { padding: 5px 10px 5px 7px; line-height: 17px; display: block; float: left; margin: 0 7px 0 0; background-color: #f5f5f5; border: 1px solid #dedede; border-top: 1px solid #eee; border-left: 1px solid #eee; }
#Disqus_bt{color: #336699}
#duoshuo_bt{color: #d12f19}
#duoshuo_bt.newclass{background-color:#DFF4FF}
#Disqus_bt.newclass{background-color:#E6EFC2}
</style>
<!--likaci css style end-->
<section id="comment">
<h1 class="title"><%= __('comment') %></h1>
<!--likaci add button begin-->
<div id="duoshuo_bt">多说</div>
<div id="Disqus_bt" >Disqus</div>
<!--liakc add button end-->
<div id="disqus_thread">
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
<!--likaci add duoshuo begin-->
<div class="ds-thread"></div>
<script type="text/javascript">
var duoshuoQuery = {short_name:"yourshotname"};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.src = 'http://static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<!--likaci add duoshuo end-->
</section>
<% } %>

注意,tab.js请参考脚本之家,稍有基础的人就能看懂。

ArcMap触摸屏绘图辅助程序

这个脚本应该是写过最长的脚本了(囧,具体有多长有兴趣的可以去看下……

脚本的功能就是作为一个外挂程序,辅助ArcMap使用触摸屏进行绘图,程序的界面提供了最常用的绘图功能。不知道最新版的ArcMap有没有集成类似的功能。
具体的功能可以参照视频。

Read More