好了,這些都不爲我工作,但我用這些答案創建一個腳本的作品。下面是我使用的代碼:
;; The base function for the line-based ones
(defun ace-jump-end-do (dfunc afunc)
;; Save where to return to as a marker
(setq ace-jump-do-retpos (make-marker))
(set-marker ace-jump-do-retpos (point))
;; Add our during function to the hook
(setq ace-jump-mode-end-hook
(list `(lambda()
(progn
(setq ace-jump-mode-end-hook)
(,dfunc)
(goto-char ace-jump-do-retpos)
(set-marker ace-jump-do-retpos nil)
(,afunc)
))))
(ace-jump-line-mode)
)
;; Copy the line above the current line
(defun ace-jump-yank-line-above()
(interactive)
(ace-jump-end-do
;; At the line
(lambda()
;; Store the line in a variable
(setq line (buffer-substring-no-properties (point-at-bol) (point-at-eol)))
)
;; Upon returning
(lambda()
(save-excursion
(goto-char (point-at-bol))
(insert (concat line "\n"))
)
(when (bolp) (goto-char (point-at-bol 2)))
)))
不幸的是,這種復位王牌跳每次它被稱爲時間結束鉤。它適用於我,雖然我沒有任何其他東西掛鉤它。如果我遇到問題,我需要找出其他的東西。
出於好奇,「ace-jump」是什麼樣子,而不是「ace-jump」本身? – PythonNut
漫長而沉悶的故事;簡短的版本是我正在編寫一個軟件包,以便在後者出來時做ace-jump。從來沒有打擾過釋放它,但也從來沒有打擾切換。 – Dan
出於某種原因,ace-jump不喜歡和保存遊覽一起玩。光標不會返回到它開始的位置。它只停留在甲板跳躍的地方。 – user1539179