Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add typical C-o keybinding : Make another window display that buffer. #159

Open
pedro-nonfree opened this issue Dec 4, 2024 · 1 comment

Comments

@pedro-nonfree
Copy link

pedro-nonfree commented Dec 4, 2024

deadgrep is great software, you can use o to deadgrep-visit-result-other-window

But I don't see the typical C-o I see in other emacs packages/functions such as dired and list-buffers, where C-o shows the file in another buffer so you can select different files pretty fast

@pedro-nonfree pedro-nonfree changed the title [Feature Add typical C-o keybinding [Feature Request] Add typical C-o keybinding : Make another window display that buffer. Dec 4, 2024
@pedro-nonfree
Copy link
Author

pedro-nonfree commented Dec 4, 2024

meanwhile, this works for me :)

;; used same terminology of (list-buffers) from Buffer-menu
;; o      Buffer-menu-other-window
;; C-o    Buffer-menu-switch-other-window
(defun my/deadgrep-switch-other-window ()
  "Make the other window show the result."
  (interactive)
  (deadgrep-visit-result-other-window)
  (other-window -1))

(use-package deadgrep :ensure t
  :config
  (define-key deadgrep-mode-map (kbd "C-o") 'my/deadgrep-switch-other-window))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant