您的位置:首页 > 其它

Emacs快捷键自动插入当前时间

2018-02-27 15:31 225 查看
1、首先是定义一个函数。看不懂,从网上抄袭过来的。
(defun insert-current-time ()
    "Insert the current time"
    (interactive "*")
    (insert (current-time-string)))

2、之后定义这个函数对应的快捷键

(global-set-key "\C-xt" 'insert-current-time)

注意:;;  后面可以写注释
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  emacs 杂项