diff options
author | Alan Pearce | 2017-02-19 13:38:08 +0100 |
---|---|---|
committer | Alan Pearce | 2017-02-19 13:38:08 +0100 |
commit | d4831b52d94a87578f05985630688b123c564c03 (patch) | |
tree | bd81d006f97fd064ae7f8a4d0380890ab86663ca | |
parent | 8da664ea9c7dfcb55ed89099c050e40c640556c2 (diff) | |
download | nixfiles-d4831b52d94a87578f05985630688b123c564c03.tar.lz nixfiles-d4831b52d94a87578f05985630688b123c564c03.tar.zst nixfiles-d4831b52d94a87578f05985630688b123c564c03.zip |
Emacs: Remove perspective
It seemed to slow things down a lot, particularly on macOS. I seem to be able to get on fine without it, as well.
-rw-r--r-- | tag-emacs/emacs.d/init.org | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 685d9f85..8408f0a1 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -403,7 +403,7 @@ configuration with crux.el #+BEGIN_SRC emacs-lisp (defun switch-to-dotfiles () (interactive) - (projectile-persp-switch-project (expand-file-name "dotfiles" home-project-directory))) + (projectile-switch-project-by-name (expand-file-name "dotfiles" home-project-directory))) #+END_SRC ** The Silver Searcher @@ -435,7 +435,9 @@ based upon some folder conventions I use. #+BEGIN_SRC emacs-lisp (use-package projectile - :bind (("C-c C-f" . projectile-find-file) + :bind (("s-p" . projectile-switch-project) + ("C-x b" . projectile-switch-to-buffer) + ("C-c C-f" . projectile-find-file) ("s-x s-f" . projectile-find-file) ("C-x g" . projectile-vc) ("s-G" . projectile-vc)) @@ -484,24 +486,6 @@ based upon some folder conventions I use. projectile-completion-system 'ivy))) #+END_SRC -** perspective - -This package makes buffer-switching inside of projects make sense, by -filtering the candidates to those within the project. For it to work, -it needs hooking into projectile and a key bound to switch between projects. - -#+BEGIN_SRC emacs-lisp -(use-package perspective - :bind* ("s-p" . projectile-persp-switch-project) - :demand t - :config (progn - (setq persp-show-modestring t) - (persp-mode))) - -(use-package persp-projectile - :ensure t) -#+END_SRC - ** vc This is nice for some things that magit doesn’t do, and for those rare @@ -834,8 +818,7 @@ This is a frontend to the GPG-powered =pass= program. * Buffers ** Ibuffer -Ibuffer is quite nice for listing all buffers. I don’t use it very -often though, as it doesn’t really work with perspectives. +Ibuffer is quite nice for listing all buffers. #+BEGIN_SRC emacs-lisp (use-package ibuffer @@ -1339,7 +1322,6 @@ replacement for helm so far. (bind-key "<menu>" #'counsel-M-x) (bind-key "C-c M-x" #'execute-extended-command) (bind-key "C-x C-f" #'counsel-find-file) - (bind-key "C-x b" #'counsel-switch-to-persp-buffer) (bind-key "M-y" #'counsel-yank-pop) (bind-key "M-y" #'ivy-next-line ivy-minibuffer-map) (defadvice counsel-find-file (after find-file-sudo activate) @@ -1347,15 +1329,7 @@ replacement for helm so far. (when (and buffer-file-name (not (file-writable-p buffer-file-name))) (message "File not writable %s" buffer-file-name) - (find-alternate-file (concat "/sudo::" buffer-file-name)))) - (defun counsel-switch-to-persp-buffer (arg) - "Forward to `persp-switch-to-buffer'." - (interactive "P") - (ivy-read (format "Switch to buffer [%s]: " (persp-name persp-curr)) - (remq nil (mapcar #'buffer-name (persp-buffers persp-curr))) - :preselect (buffer-name (other-buffer (current-buffer))) - :action #'ivy--switch-buffer-action - :keymap ivy-switch-buffer-map)))) + (find-alternate-file (concat "/sudo::" buffer-file-name)))))) #+END_SRC @@ -1476,7 +1450,7 @@ works really nicely. :init (progn (defun open-budget () (interactive) - (projectile-persp-switch-project "~/Sync") + (projectile-switch-project-by-name "~/Sync/Default") (find-file (expand-file-name "ledger/my.ledger" (projectile-project-root))) (ledger-report "Budget (Cumulative)" nil))) :config (progn |