summary refs log tree commit diff
path: root/emacs.d/custom/fcuny-navigation.el
diff options
context:
space:
mode:
authorFranck Cuny <fcuny@twitter.com>2019-02-16 14:10:22 -0800
committerFranck Cuny <fcuny@twitter.com>2019-02-16 14:10:22 -0800
commit67c2168998c829c8739a0a4f73ab9d6117d07f0a (patch)
treea4dcb9f8a99f527187b08e77aea85e632c6a1396 /emacs.d/custom/fcuny-navigation.el
parent[emacs] Add a function to select and copy buffer. (diff)
downloademacs.d-67c2168998c829c8739a0a4f73ab9d6117d07f0a.tar.gz
[emacs] Split configuration in multiple files.
This is actually an easier thing to maintain.
Diffstat (limited to '')
-rw-r--r--emacs.d/custom/fcuny-navigation.el67
1 files changed, 67 insertions, 0 deletions
diff --git a/emacs.d/custom/fcuny-navigation.el b/emacs.d/custom/fcuny-navigation.el
new file mode 100644
index 0000000..8073a8c
--- /dev/null
+++ b/emacs.d/custom/fcuny-navigation.el
@@ -0,0 +1,67 @@
+(require 'fcuny-vars)
+
+(use-package ace-window
+  :ensure t
+  :bind (("C-x o" . ace-window)))
+
+(use-package ag
+  :ensure t
+  :bind (:map ag-mode-map
+              ("p" . compilation-previous-error)
+              ("n" . compilation-next-error)
+              ("N" . compilation-next-file)
+              ("P" . compilation-previous-file))
+  :custom
+  (ag-highlight-search t)
+  (ag-reuse-buffers t)
+  (ag-reuse-window t))
+
+(use-package bookmark
+  :custom
+  (bookmark-default-file (expand-file-name "bookmarks" fcuny-path-emacs-var))
+  (bookmark-save-flag 1))
+
+(use-package counsel
+  :ensure t
+  :init (counsel-mode 1) (ivy-mode 1)
+  :bind
+  (("M-x"     . counsel-M-x)
+   ("C-s"     . counsel-grep-or-swiper)
+   ("C-x C-f" . counsel-find-file)
+   ("C-x C-r" . counsel-recentf)
+   ("C-c f"   . counsel-git)
+   ("C-c s"   . counsel-git-grep)
+   ("C-c /"   . counsel-ag)
+   ("C-x r l" . counsel-bookmark))
+  :custom
+  (counsel-find-file-at-point t)
+  (ivy-use-virtual-buffers t)
+  (ivy-count-format "(%d/%d) ")
+  (ivy-height 10)
+  :config
+  (use-package swiper
+    :ensure t))
+
+(use-package dired
+  :defer t
+  :bind (("C-x C-d" . dired)
+         ("C-x C-j" . dired-jump))
+  :init
+  (setq-default dired-dwim-target t)
+  (setq-default dired-listing-switches "--group-directories-first -alh")
+  (setq dired-recursive-deletes 'always)
+  (setq dired-recursive-copies 'always)
+
+  (let ((gls (executable-find "/opt/twitter/bin/gls")))
+    (when gls (setq insert-directory-program gls))))
+
+(use-package ibuffer
+  :bind ("C-x C-b" . ibuffer))
+
+(use-package recentf
+  :config
+  (recentf-mode 1)
+  (setq recentf-max-saved-items 500
+        recentf-save-file (expand-file-name "var/recentf" user-emacs-directory)))
+
+(provide 'fcuny-navigation)