Improve some keybindings

This commit is contained in:
Bozhidar Batsov 2020-12-10 21:01:13 +02:00
parent 6236bfefd9
commit 446dc7dd3b
7 changed files with 23 additions and 17 deletions

View file

@ -77,10 +77,10 @@ PROMPT sets the `read-string prompt."
"Press <C-c p s g> to run grep on a project."
"Press <C-c p p> to switch between projects."
"Press <C-=> to expand the selected region."
"Press <C-c g> to search in Google."
"Press <C-c G> to search in GitHub."
"Press <C-c y> to search in YouTube."
"Press <C-c U> to search in DuckDuckGo."
"Press <C-c C-/ g> to search in Google."
"Press <C-c C-/ h> to search in GitHub."
"Press <C-c C-/ y> to search in YouTube."
"Press <C-c C-/ d> to search in DuckDuckGo."
"Press <C-c r> to rename the current buffer and the file it's visiting if any."
"Press <C-c t> to open a terminal in Emacs."
"Press <C-c k> to kill all the buffers, but the active one."

View file

@ -95,8 +95,9 @@
;; toggle menu-bar visibility
(global-set-key (kbd "<f12>") 'menu-bar-mode)
(global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "C-x M-g") 'magit-dispatch)
;; Magit creates some global keybindings by default
;; but it's a nice to complement them with this one
(global-set-key (kbd "C-c g") 'magit-file-dispatch)
(global-set-key (kbd "C-=") 'er/expand-region)

View file

@ -36,10 +36,10 @@
(defvar prelude-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "C-c o") 'crux-open-with)
(define-key map (kbd "C-c g") 'prelude-google)
(define-key map (kbd "C-c G") 'prelude-github)
(define-key map (kbd "C-c y") 'prelude-youtube)
(define-key map (kbd "C-c U") 'prelude-duckduckgo)
(define-key map (kbd "C-c C-/ g") 'prelude-google)
(define-key map (kbd "C-c C-/ h") 'prelude-github)
(define-key map (kbd "C-c C-/ y") 'prelude-youtube)
(define-key map (kbd "C-c C-/ d") 'prelude-duckduckgo)
;; mimic popular IDEs binding, note that it doesn't work in a terminal session
(define-key map (kbd "C-a") 'crux-move-beginning-of-line)
(define-key map [(shift return)] 'crux-smart-open-line)
@ -78,8 +78,9 @@
(define-key map (kbd "s-o") 'crux-smart-open-line-above)
;; magit
(define-key map (kbd "s-m m") 'magit-status)
(define-key map (kbd "s-m l") 'magit-log)
(define-key map (kbd "s-m f") 'magit-log-buffer-file)
(define-key map (kbd "s-m j") 'magit-dispatch)
(define-key map (kbd "s-m k") 'magit-file-dispatch)
(define-key map (kbd "s-m l") 'magit-log-buffer-file)
(define-key map (kbd "s-m b") 'magit-blame)
;; misc
(define-key map (kbd "s-/") 'hippie-expand))