added an optional parameter to allow indent many lines

This commit is contained in:
Daniel Wu 2014-11-16 21:30:48 -05:00
parent 854626d634
commit 3eb6400959
2 changed files with 11 additions and 3 deletions

View File

@ -67,6 +67,14 @@ the current state and point position."
(save-excursion
(evil-save-state (evil-open-above count))))
(defun evil-goto-next-line-and-indent (&optional count)
(interactive "p")
(let ((counter (or count 1)))
(while (> counter 0)
(join-line 1)
(sp-newline)
(setq counter (1- counter)))))
;; from magnars
(defun eval-and-replace ()
"Replace the preceding sexp with its value."
@ -459,7 +467,7 @@ Adapted from `flyspell-correct-word-before-point'."
"Default"))
:must-match t
:alistp t)
poss word cursor-location start end opoint)))
(ispell-pdict-save t)))))
@ -531,7 +539,7 @@ kill internal buffers too."
" Fill the line with CHAR up to the given COLUMN"
(interactive "cFill with char: \nnUp to column: "
char column)
)
(defun toggle-fullscreen ()

View File

@ -84,7 +84,7 @@
"J" 'sp-split-sexp
"jJ" (lambda () (interactive) (sp-split-sexp 1) (sp-newline))
"jj" 'sp-newline
"jk" (lambda () (interactive) (join-line 1) (sp-newline)))
"jk" 'evil-goto-next-line-and-indent)
;; navigation -----------------------------------------------------------------
(evil-leader/set-key
"jh" (lambda () (interactive) (push-mark (point)) (evil-beginning-of-line))