From ba91893c5fca49b512e3bf86d5f25a07d58f6f4c Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 4 Jan 2015 01:49:37 -0500 Subject: [PATCH 1/3] Fix evil-tutor configuration --- spacemacs/packages.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index a26fcde1ff68..3939da53c3cf 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -778,13 +778,13 @@ determine the state to enable when escaping from the insert state.") (defun spacemacs/init-evil-tutor () (use-package evil-tutor - :commands (evil-tutor/start - evil-tutor/resume) + :commands (evil-tutor-start + evil-tutor-resume) :init (progn (setq evil-tutor-working-directory (concat spacemacs-cache-directory ".tutor/")) - (evil-leader/set-key "hT" 'evil-tutor/start)))) + (evil-leader/set-key "hT" 'evil-tutor-start)))) (defun spacemacs/init-evil-visualstar () (use-package evil-visualstar From 21c9e3c606879b1ec68bcac4992c95d7ba2e229c Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 4 Jan 2015 01:49:53 -0500 Subject: [PATCH 2/3] Better `h` behavior: collapse expanded dir of go to parent node --- doc/DOCUMENTATION.md | 2 +- spacemacs/packages.el | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/DOCUMENTATION.md b/doc/DOCUMENTATION.md index 3058b8c42e1c..1761e4d72c72 100644 --- a/doc/DOCUMENTATION.md +++ b/doc/DOCUMENTATION.md @@ -1171,7 +1171,7 @@ experience like in [ranger][]: Key Binding | Description ---------------------------------|---------------------------------------------------------------- -h | collapse directory +h | collapse expanded directory or go to parent node H | previous sibling j | next file or directory J | next expanded directory on level down diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 3939da53c3cf..ad89475f7e5c 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1468,6 +1468,17 @@ determine the state to enable when escaping from the insert state.") (when neo-auto-indent-point (neo-point-auto-indent))))) + (defun spacemacs/neotree-collapse-or-up () + "Collapse an expanded directory node or go to the parent node." + (interactive) + (let ((node (neo-buffer--get-filename-current-line))) + (when node + (if (file-directory-p node) + (if (neo-buffer--expanded-node-p node) + (spacemacs/neotree-collapse) + (neotree-select-up-node)) + (neotree-select-up-node))))) + (defun spacemacs//neotree-key-bindings () "Set the key bindings for a neotree buffer." (define-key evil-motion-state-local-map (kbd "TAB") 'neotree-stretch-toggle) @@ -1478,7 +1489,7 @@ determine the state to enable when escaping from the insert state.") (define-key evil-motion-state-local-map (kbd "c") 'neotree-create-node) (define-key evil-motion-state-local-map (kbd "d") 'neotree-delete-node) (define-key evil-motion-state-local-map (kbd "g") 'neotree-refresh) - (define-key evil-motion-state-local-map (kbd "h") 'spacemacs/neotree-collapse) + (define-key evil-motion-state-local-map (kbd "h") 'spacemacs/neotree-collapse-or-up) (define-key evil-motion-state-local-map (kbd "H") 'neotree-select-previous-sibling-node) (define-key evil-motion-state-local-map (kbd "J") 'neotree-select-down-node) (define-key evil-motion-state-local-map (kbd "K") 'neotree-select-up-node) From 774d1ce64b316f7b4e644cd3a0f7d3189e8e599e Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 4 Jan 2015 01:50:35 -0500 Subject: [PATCH 3/3] Bump version to 0.42.0 --- core/spacemacs-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/spacemacs-mode.el b/core/spacemacs-mode.el index 787d71e0b799..b1316ac21e8c 100644 --- a/core/spacemacs-mode.el +++ b/core/spacemacs-mode.el @@ -4,7 +4,7 @@ (require 'subr-x nil 'noerror) (require 'emacs-backports) -(defconst spacemacs-version "0.41.2" +(defconst spacemacs-version "0.42.0" "Spacemacs version.") (defconst spacemacs-min-version "24.3"