Always assign neotree to window 0 (a la Spacemacs)

This commit is contained in:
Jeremy Dormitzer 2019-10-29 10:46:24 -04:00
parent e918d94430
commit 9f78153b2f

View File

@ -658,9 +658,13 @@ Olivetti is a minor mode for a nice writing environment.
* Winum
This package includes functions to switch windows by number.
#+BEGIN_SRC emacs-lisp
(defun winum-assign-0-to-neotree ()
(when (string-match-p (buffer-name) ".*\\NeoTree\\*.*") 10))
(use-package winum
:config
(winum-mode)
(add-to-list 'winum-assign-functions #'winum-assign-0-to-neotree)
(leader-def-key "0" 'winum-select-window-0-or-10)
(leader-def-key "1" 'winum-select-window-1)
(leader-def-key "2" 'winum-select-window-2)