質問

I'm using Aquamacs with markdown-mode. Two questions.

  1. Markdown Mode says you can use the key binding SHIFT-TAB to cycle the global visibility of headings. But when I hit SHIFT-TAB, I get "kill ring is empty," and I see that it's invoking the "yank" command.

What's interfering with Markdown Mode here? I tried this:

(global-unset-key (kbd "<S-tab>") )

but it didn't make a difference. I still get "kill ring is empty"

How do I unset "yank" and reassign SHIFT-TAB to cycle global visibility?

  1. In Markdown Mode, is there a way to open a subtree in an indirect buffer?

Thanks!

役に立ちましたか?

解決

From the developer, Jason Blevins:

In the new version (and to appear in the Git repository soon), I've included a patch for more comprehensive key bindings for header cycling. The problem is that the behavior of "shift-tab" is quite different across different platforms. (See here for more details: http://lists.gnu.org/archive/html/emacs-devel/2010-08/msg00061.html).

The function you were looking for is `markdown-shifttab'. I've now added bindings for and for this function. Hopefully this should do the trick on your system.

The patch simply involves adding two lines:

diff --git a/markdown-mode.el b/markdown-mode.el
index 9fb5123..ca04704 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -1804,6 +1804,8 @@ it in the usual way."
     ;; Visibility cycling
     (define-key map (kbd "<tab>") 'markdown-cycle)
     (define-key map (kbd "<S-iso-lefttab>") 'markdown-shifttab)
+    (define-key map (kbd "<S-tab>")  'markdown-shifttab)
+    (define-key map (kbd "<backtab>") 'markdown-shifttab)
     ;; Header navigation
     (define-key map (kbd "C-M-n") 'outline-next-visible-heading)
     (define-key map (kbd "C-M-p") 'outline-previous-visible-heading)

他のヒント

SHIFT-TAB is not one of the default global keybindings. I suspect you have either set this yourself somewhere in your .emacs, or you've got a minor mode that uses this binding. From your markdown buffer, enter C-h b. This will open up a new buffer that lists all the key-bindings currently in effect. Search through that list for 'tab' and see if you can find the offending minor mode. If it actually does show up in the global map, that means you've got something in your .emacs that caused the problem.

it you use evil, you can type za at headings.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top