emacs24 backtab未定义,如何定义此快捷键

时间:2014-05-16 04:54:54

标签: emacs emacs24

如何在emacs24中定义<backtab>短键?

我找到了一些解决方案,

像:

但它对我不起作用。


最后:

(global-set-key (kbd "<backtab>") 'un-indent-by-removing-4-spaces)
(defun un-indent-by-removing-4-spaces ()
  "remove 4 spaces from beginning of of line"
  (interactive)
  (save-excursion
    (save-match-data
      (beginning-of-line)
      ;; get rid of tabs at beginning of line
      (when (looking-at "^\\s-+")
        (untabify (match-beginning 0) (match-end 0)))
      (when (looking-at "^    ")
        (replace-match "")))))

为我工作 !!!

感谢@Drew和@lawlist。

0 个答案:

没有答案