Added FAQ entry for remapping paste key

This commit is contained in:
Immortalin 2016-03-14 21:18:31 +08:00 committed by syl20bnr
parent 0f76d52166
commit 95ca114ee6
1 changed files with 15 additions and 0 deletions

View File

@ -38,6 +38,7 @@
- [[Try Spacemacs without modifying my existing Emacs configuration?][Try Spacemacs without modifying my existing Emacs configuration?]]
- [[Make copy/paste working with the mouse in X11 terminals?][Make copy/paste working with the mouse in X11 terminals?]]
- [[Use =helm-ag= to search only in files of a certain type?][Use =helm-ag= to search only in files of a certain type?]]
- [[Remap paste key to be able to paste copied text multiple times][Remap paste key to be able to paste copied text multiple times]]
- [[Windows][Windows]]
- [[Why do the fonts look crappy on Windows?][Why do the fonts look crappy on Windows?]]
- [[Why is there no Spacemacs logo in the startup buffer?][Why is there no Spacemacs logo in the startup buffer?]]
@ -446,6 +447,20 @@ some expressions to the search input:
This is possible because =helm-ag= is treating the search input as command-line
arguments of the =ag= program.
** Remap paste key to be able to paste copied text multiple times
In vim and evil, pasting over a text would cause it to be copied, hence making it impossible to paste
the same text multiple times.
To fix this, add the following snippet to your ~user-config~:
#+BEGIN_SRC emacs-lisp
(defun evil-paste-after-from-0 ()
(interactive)
(let ((evil-this-register ?0))
(call-interactively 'evil-paste-after)))
(define-key evil-visual-state-map "p" 'evil-paste-after-from-0)
#+END_SRC
* Windows
** Why do the fonts look crappy on Windows?
You can install [[https://code.google.com/archive/p/gdipp/][GDIPP]] (simplest) or [[https://code.google.com/p/mactype/][MacType]] (more complete) on Windows to get