您的位置:首页 > 其它

Nov 18. one day after

2010-11-18 19:36 281 查看
emacs的键盘宏很好用啊



1 define a kbd macro

start by C-x (

end by C-x )

Give the last kbd macro a name:



2 name a kbd macro

M-x name-last-kbd-macro

we just need type M-x name, then press tab key. :)



3 eternal

If we want use the kbd macro after we restart emacs,

write it into the .emacs configure file.

open your .emacs file

M-x insert-kbd-macro

then give emacs the macro name you want save and press enter



4 key binding

Sometimes, we use a kbd macro often, then we could bind the macro

to a quick key by

(global-set-key "/C-cm" 'macro-name)

here /C means ctrl key. '-' means and.



×××××××××××××××××××××××××××××××××××××××××××××××××



×××××××××××××××××××××××××××××××××××××××××××××××××



对于const的使用心得:

只需将const右面的内容括起来即可,const只修饰其右面的内容

例如:

const (int *p)-->指向整型常量的指针

int const (*P)-->同上

int * const (p)-->指针是常量,其指向的值可变。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: