summary refs log tree commit diff
path: root/emacs.d/custom/fcuny-navigation.el
blob: 18ad2ded8510ef7648b51a625e37a1de37b31352 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
(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 dired-x
  :ensure nil
  :config
  (progn
    (setq dired-omit-verbose nil)
    ;; hide backup, autosave, *.*~ files
    ;; omit mode can be toggled using `C-x M-o' in dired buffer.
    (add-hook 'dired-mode-hook #'dired-omit-mode)
    (setq dired-omit-files
          (concat dired-omit-files "\\|^.DS_STORE$\\|^.localized$\\|^.projectile$\\|^.git$"))))

(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)