diff options
author | Alan Pearce | 2015-12-23 10:38:34 +0100 |
---|---|---|
committer | Alan Pearce | 2015-12-23 10:40:32 +0100 |
commit | 2d0a04dd67f6b6b67c80e4991b19bb96a074c02e (patch) | |
tree | 34228a3dd6751db3a728cb95937a2757cf3ed342 /tag-emacs | |
parent | 4ca6509128fee2d37aa01e34e3ef653f79279729 (diff) | |
download | nixfiles-2d0a04dd67f6b6b67c80e4991b19bb96a074c02e.tar.lz nixfiles-2d0a04dd67f6b6b67c80e4991b19bb96a074c02e.tar.zst nixfiles-2d0a04dd67f6b6b67c80e4991b19bb96a074c02e.zip |
Emacs: fix whitespace
Diffstat (limited to 'tag-emacs')
-rw-r--r-- | tag-emacs/emacs.d/init.org | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index a5226283..a41c341e 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -212,45 +212,44 @@ ones. I added a couple of functions to allow me to open new projects based upon some folder conventions I use. #+BEGIN_SRC emacs-lisp -(use-package projectile - :bind (("C-c C-f" . projectile-find-file) - ("s-x s-f" . projectile-find-file) - ("C-x g" . projectile-vc) - ("s-G" . projectile-vc)) - :init (projectile-global-mode) - :diminish projectile-mode - :config (progn - (defun ap/subfolder-projects (dir) - (--map (file-relative-name it dir) - (-filter (lambda (subdir) - (--reduce-from (or acc (funcall it subdir)) nil - projectile-project-root-files-functions)) - (-filter #'file-directory-p (directory-files dir t "\\<"))))) - - (defun ap/-add-known-subfolder-projects (dir) - (-map #'projectile-add-known-project (--map (concat (file-name-as-directory dir) it) (ap/subfolder-projects dir)))) + (use-package projectile + :bind (("C-c C-f" . projectile-find-file) + ("s-x s-f" . projectile-find-file) + ("C-x g" . projectile-vc) + ("s-G" . projectile-vc)) + :init (projectile-global-mode) + :diminish projectile-mode + :config (progn + (defun ap/subfolder-projects (dir) + (--map (file-relative-name it dir) + (-filter (lambda (subdir) + (--reduce-from (or acc (funcall it subdir)) nil + projectile-project-root-files-functions)) + (-filter #'file-directory-p (directory-files dir t "\\<"))))) - (defun ap/add-known-subfolder-projects () - (interactive) - (ap/-add-known-subfolder-projects (read-directory-name "Add projects under: "))) + (defun ap/-add-known-subfolder-projects (dir) + (-map #'projectile-add-known-project (--map (concat (file-name-as-directory dir) it) (ap/subfolder-projects dir)))) - (defun ap/open-subfolder-project (from-dir &optional arg) - (let ((project-dir (projectile-completing-read "Open project: " - (ap/subfolder-projects from-dir)))) - (projectile-switch-project-by-name (expand-file-name project-dir from-dir) arg))) + (defun ap/add-known-subfolder-projects () + (interactive) + (ap/-add-known-subfolder-projects (read-directory-name "Add projects under: "))) - (defun ap/open-work-project (&optional arg) - (interactive "P") - (ap/open-subfolder-project work-project-directory arg)) + (defun ap/open-subfolder-project (from-dir &optional arg) + (let ((project-dir (projectile-completing-read "Open project: " + (ap/subfolder-projects from-dir)))) + (projectile-switch-project-by-name (expand-file-name project-dir from-dir) arg))) - (defun ap/open-home-project (&optional arg) - (interactive "P") - (ap/open-subfolder-project home-project-directory arg)) + (defun ap/open-work-project (&optional arg) + (interactive "P") + (ap/open-subfolder-project work-project-directory arg)) + (defun ap/open-home-project (&optional arg) + (interactive "P") + (ap/open-subfolder-project home-project-directory arg)) - (setq projectile-switch-project-action #'projectile-dired - projectile-remember-window-configs t - projectile-completion-system 'ivy))) + (setq projectile-switch-project-action #'projectile-dired + projectile-remember-window-configs t + projectile-completion-system 'ivy))) #+END_SRC ** perspective |