Fixes #220 missing description of commands in guide-key

This commit is contained in:
syl20bnr 2014-12-10 23:46:35 -05:00
parent afac4e9505
commit f1e9396fcb
2 changed files with 23 additions and 4 deletions

View File

@ -102,6 +102,25 @@ bindings contained in BODY."
(defvar spacemacs-cur-theme (pop spacemacs-themes)
"Current spacemacs theme.")
(defun spacemacs/split-and-new-line ()
"Split a quoted string or s-expression and insert a new line with
auto-indent."
(interactive)
(sp-split-sexp 1)
(sp-newline))
(defun spacemacs/push-mark-and-goto-beginning-of-line ()
"Push a mark at current location and go to the beginnign of the line."
(interactive)
(push-mark (point))
(evil-beginning-of-line))
(defun spacemacs/push-mark-and-goto-end-of-line ()
"Push a mark at current location and go to the end of the line."
(interactive)
(push-mark (point))
(evil-end-of-line))
(defun spacemacs/cycle-spacemacs-theme ()
"Cycle through themes defined in spacemacs-themes."
(interactive)

View File

@ -88,14 +88,14 @@
;; <SPC> j k key binding for a frequent action: go and indent line below the point
;; <SPC> J split the current line at point and indent it
(evil-leader/set-key
"J" 'sp-split-sexp
"jJ" (lambda () (interactive) (sp-split-sexp 1) (sp-newline))
"J" 'sp-split-sexp
"jJ" 'spacemacs/split-and-new-line
"jj" 'sp-newline
"jk" 'evil-goto-next-line-and-indent)
;; navigation -----------------------------------------------------------------
(evil-leader/set-key
"jh" (lambda () (interactive) (push-mark (point)) (evil-beginning-of-line))
"jl" (lambda () (interactive) (push-mark (point)) (evil-end-of-line)))
"jh" 'spacemacs/push-mark-and-goto-beginning-of-line
"jl" 'spacemacs/push-mark-and-goto-end-of-line)
;; Compilation ----------------------------------------------------------------
(evil-leader/set-key "cc" 'helm-make-projectile)
(evil-leader/set-key "cC" 'compile)