Skip to content

Commit

Permalink
New variable dotspacemacs-remap-Y-to-y$
Browse files Browse the repository at this point in the history
  • Loading branch information
syl20bnr committed Sep 29, 2015
1 parent afa537d commit 14fd2b4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions core/core-dotspacemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ size to make separators look not too crappy.")
By default the command key is `:' so ex-commands are executed like in Vim
with `:' and Emacs commands are executed with `<leader> :'.")

(defvar dotspacemacs-remap-Y-to-y$ t
"If non nil `Y' is remapped to `y$'.")

(defvar dotspacemacs-use-ido nil
"If non nil then `ido' replaces `helm' for some commands. For now only
`find-files' (SPC f f) is replaced.")
Expand Down
2 changes: 2 additions & 0 deletions core/templates/.spacemacs.template
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ values."
;; By default the command key is `:' so ex-commands are executed like in Vim
;; with `:' and Emacs commands are executed with `<leader> :'.
dotspacemacs-command-key ":"
"If non nil `Y' is remapped to `y$'. (default t)"
dotspacemacs-remap-Y-to-y$ t
;; Location where to auto-save files. Possible values are `original' to
;; auto-save the file in-place, `cache' to auto-save the file to another
;; file stored in the cache directory and `nil' to disable auto-saving.
Expand Down
7 changes: 5 additions & 2 deletions layers/+distribution/spacemacs-base/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,11 @@
"Yank from point to end of line."
(interactive)
(evil-yank (point) (point-at-eol)))
(define-key evil-normal-state-map (kbd "Y") 'spacemacs/evil-yank-to-end-of-line)
(define-key evil-motion-state-map (kbd "Y") 'spacemacs/evil-yank-to-end-of-line)
(when dotspacemacs-remap-Y-to-y$
(define-key evil-normal-state-map (kbd "Y")
'spacemacs/evil-yank-to-end-of-line)
(define-key evil-motion-state-map (kbd "Y")
'spacemacs/evil-yank-to-end-of-line))

(evil-leader/set-key "re" 'evil-show-registers)

Expand Down

0 comments on commit 14fd2b4

Please sign in to comment.