Use Ultisnips to insert ING Direct Paywave rebate records for ledger

It has been realy a long time since my last article. Anyway, I am here again. Now in Australia, I think I should start to write in English to expose the content to a broader scope of audience.

I have been using ledger for personal accounting for 10 months now. It amazes myself that I could persist in putting every cents spent down in the ledger file for such a long time.

重新定义capslock键

Capslock可能是键盘上最没用的键了。因为我用awesome,modkey用得太多用来切换程序和workspace,于是我用了下面的xmodmap设置来将Capslock定义成Windows键,也就是Super:

clear lock
remove lock = Caps_Lock
keycode 66 = Super_R

最近看到一个更赞的用法。有人把Capslock同时当作Escape和Ctrl来用,按一下就是Escape,按住就是Ctrl。在Linux下需要一个叫做xcape的程序来配合。由于我对于Super的依赖超过Ctrl,我便把Capslock同时当作Escape和Super来使。

在screen里面改变光标颜色

如果你用vim和xterm,在vim可以依据是插入模式还是命令模式改变光标颜色,只需要在 .vimrc里面添加:

:silent !echo -ne "\e]12;IndianRed2\007"
let &t_SI = "\e]12;RoyalBlue1\007"
let &t_EI = "\e]12;IndianRed2\007"
autocmd VimLeave * :!echo -ne "\e]12;green\007"

第一句是在进入vim的时候,把光标变成红的;第二句定义进入插入模式,光标变成蓝色的 ;第三句的意思是插入模式结束,光标变回红的;第四句,设定vim退出的时候,光标变成 绿色。