diff options
Diffstat (limited to 'lisp/init-grep.el')
-rw-r--r-- | lisp/init-grep.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/init-grep.el b/lisp/init-grep.el index 934ba7c..8b04c6e 100644 --- a/lisp/init-grep.el +++ b/lisp/init-grep.el @@ -11,21 +11,21 @@ (interactive) (grep-visit-buffer-other-window event t)) +(defun grep-mode-buffer-local-variables () + ;; wrap lines + (setq-local truncate-lines nil)) + (use-package grep :ensure nil ;; package is bundled with emacs + :hook (grep-mode . grep-mode-buffer-local-variables) + :bind (:map grep-mode-map ;; make C-o and o behave as in dired ("o" . grep-visit-buffer-other-window) ("C-o" . grep-visit-buffer-other-window-noselect) ;; n and p changes line as in ag-mode ("n" . compilation-next-error) - ("p" . compilation-previous-error)) - - :config - (add-hook 'grep-mode-hook - (lambda () - ;; wrap lines - (setq-local truncate-lines nil)))) + ("p" . compilation-previous-error))) (provide 'init-grep) |