扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
(global-set-key [(control space)] 'hippie-expand)
(global-set-key [(control return)] 'set-mark-command)
(require 'hippie-exp)
(setq hippie-expand-try-functions-list
'(try-expand-dabbrev
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-complete-file-name-partially
try-complete-file-name
try-complete-lisp-symbol-partially
try-complete-lisp-symbol
try-expand-whole-kill))
(setq skeleton-pair t)
(local-set-key (kbd "[") 'skeleton-pair-insert-maybe)
(local-set-key (kbd "(") 'skeleton-pair-insert-maybe)
(local-set-key (kbd "{") 'skeleton-pair-insert-maybe)
(local-set-key (kbd "<") 'skeleton-pair-insert-maybe)
(defun move-line (&optional n)
"Move current line N (1) lines up/down leaving point in place."
(interactive "p")
(when (null n)
(setq n 1))
(let ((col (current-column)))
(beginning-of-line)
(next-line 1)
(transpose-lines n)
(previous-line 1)
(forward-char col)))
(defun move-line-up (n)
"Moves current line N (1) lines up leaving point in place."
(interactive "p")
(move-line (if (null n) -1 (- n))))
(defun move-line-down (n)
"Moves current line N (1) lines down leaving point in place."
(interactive "p")
(move-line (if (null n) 1 n)))
(local-set-key [(control o)] 'vi-open-next-line)
(defun vi-open-next-line (arg)
"Move to the next line (like vi) and then opens a line."
(interactive "p")
(end-of-line)
(open-line arg)
(next-line 1)
(indent-according-to-mode))
(local-set-key "%" 'match-paren)
(defun match-paren (arg)
"Go to the matching parenthesis if on parenthesis otherwise insert %."
(interactive "p")
(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
((looking-at "\\s\)") (forward-char 1) (backward-list 1))
(t (self-insert-command (or arg 1)))))
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者