diff --git a/emacs/.emacs b/emacs/.emacs index 8c51552..1b5c810 100644 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -57,7 +57,7 @@ '(menu-bar-mode nil) '(package-selected-packages (quote - (powerline-evil powerline origami projectile terminal-here shell-pop swiper neotree centered-cursor-mode ivy avy heroku-theme auto-complete use-package yasnippet evil-surround org evil-magit magit makefile-runner evil))) + (counsel powerline-evil powerline origami projectile terminal-here shell-pop swiper neotree centered-cursor-mode ivy avy heroku-theme auto-complete use-package yasnippet evil-surround org evil-magit magit makefile-runner evil))) '(scroll-bar-mode nil) '(shell-pop-shell-type (quote @@ -66,10 +66,8 @@ (ansi-term shell-pop-term-shell))))) '(shell-pop-window-position "top") '(shell-pop-window-size 20) - '(tool-bar-mode nil) - '(dired-listing-switches "-lh") - '(ac-ignore-case nil) - '(show-trailing-whitespace t)) + '(show-trailing-whitespace t) + '(tool-bar-mode nil)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -145,6 +143,14 @@ :ensure t) ;; Evil-mode +(defun my/evil-go-back () + (interactive) + (evil--jump-backward 1)) + +(defun my/evil-go-forward () + (interactive) + (evil--jump-forward 1)) + (use-package evil :ensure t :demand t @@ -153,6 +159,8 @@ (setq evil-ex-substitute-global t) (define-key evil-normal-state-map "/" 'swiper) (evil-ex-define-cmd "q" 'kill-buffer) + (define-key evil-normal-state-map "gb" 'my/evil-go-back) + (define-key evil-normal-state-map "gn" 'my/evil-go-forward) (define-key evil-motion-state-map [down-mouse-1] 'silence) (define-key evil-motion-state-map [mouse-1] 'silence) (setq-default evil-cross-lines t)) @@ -190,6 +198,10 @@ (global-origami-mode))) ;; ivy +(defun my/save-imenu-jump (item) + "WIP: Tells evil-jump to save position before jumping via imenu (or counsel-imenu)" + (evil--jumps-push)) + (use-package ivy :ensure t :demand t @@ -197,6 +209,7 @@ (ivy-mode 1) (setq ivy-use-virtual-buffers t) (setq ivy-count-format "(%d/%d) ") + (advice-add 'imenu :before 'my/save-imenu-jump) (define-key ivy-minibuffer-map (kbd "") 'ivy-immediate-done))) (use-package counsel @@ -385,6 +398,8 @@ '("*Apropos*" display-buffer-same-window)) (add-to-list 'display-buffer-alist '("*Help*" display-buffer-in-side-window)) +(add-to-list 'display-buffer-alist + '("*evil-jumps*" display-buffer-in-side-window)) (add-to-list 'display-buffer-alist '("*compilation*" (display-buffer-reuse-window display-buffer-in-side-window) (side . bottom) (size . 0.2)))