Emacs: Stop Cursor Going into Minibuffer Prompt
in emacs minibuffer prompt, when you press the left arrow key, the cursor will move back all the way over the prompt text. This is annoying because user often will hold down 【Alt+b】 to move back by word to edit, and when user starts to type something, emacs will say “This is read-only”. Then you have to manually move cursor out of the prompt. You can try it now by calling
Here's how to set the cursor not going into prompt. Put the following in your emacs init.
(customize-set-variable 'minibuffer-prompt-properties (quote (read-only t cursor-intangible t face minibuffer-prompt)))
( Thanks to Clément Pit-Claudel)
Here's alternative way to do it. Might work better if emacs changed in the future by the time you read this.
- Type “minibuffer”.
- scroll down to “Minibuffer Prompt Properties”.
- Check box “Don't Enter”.
- Go to the top, click “Apply and Save”
After that, emacs will insert the following to your init file:
(custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(minibuffer-prompt-properties (quote (read-only t cursor-intangible t face minibuffer-prompt))))
or, buy something from Best Keyboard for Emacs