Skip to content

Instantly share code, notes, and snippets.

@EMPAT94
Last active May 16, 2022 07:08
Show Gist options
  • Save EMPAT94/691526ebe01bf74cdee479d92ec4f058 to your computer and use it in GitHub Desktop.
Save EMPAT94/691526ebe01bf74cdee479d92ec4f058 to your computer and use it in GitHub Desktop.
All the default keybindings of cmd key in emacs!
;; I installed emacs today and wanted to bind some functions to cmd key.
;; That simple objective somehow ended with me noting down all default keybindings.
;; Sharing here so you don't have to go on this side quest like me. :)
;; For letters, if a corresponding capital letter is missing,
;; it means it calls the same function as its small case form
;;(global-set-key (kbd "s-`") 'other-frame)
;;(global-set-key (kbd "s-~") 'ns-prev-frame)
;;(global-set-key (kbd "s-1,2,3,4,5,6,7,8,9") ) ;; grouped together
;;(global-set-key (kbd "s-0") 'text-scale-adjust)
;;(global-set-key (kbd "s-!,@,#,$") )
;;(global-set-key (kbd "s-%") ) ;; global screenshot utility
;;(global-set-key (kbd "s-^") 'kill-some-buffers)
;;(global-set-key (kbd "s-&") 'kill-current-buffer)
;;(global-set-key (kbd "s-*,(") 'iconify-frame)
;;(global-set-key (kbd "s-)") 'iconify-frame)
;;(global-set-key (kbd "s--") 'text-scale-adjust)
;;(global-set-key (kbd "s-_") )
;;(global-set-key (kbd "s-=") 'text-scale-adjust)
;;(global-set-key (kbd "s-+") 'text-scale-adjust)
;;(global-set-key (kbd "s-<backspace>") )
;;(global-set-key (kbd "s-q") 'save-buffers-kill-emacs) ;; s-Q => Quits everything
;;(global-set-key (kbd "s-w") 'delete-frame)
;;(global-set-key (kbd "s-e") 'isearch-yank-kill)
;;(global-set-key (kbd "s-E") 'edit-abbrevs)
;;(global-set-key (kbd "s-r") )
;;(global-set-key (kbd "s-t") 'ns-popup-font-panel)
;;(global-set-key (kbd "s-y") 'ns-paste-secondary)
;;(global-set-key (kbd "s-u") 'revert-buffer)
;;(global-set-key (kbd "s-i") )
;;(global-set-key (kbd "s-o") 'ns-open-file-using-panel)
;;(global-set-key (kbd "s-p") 'ns-print-buffer)
;;(global-set-key (kbd "s-[") )
;;(global-set-key (kbd "s-{") )
;;(global-set-key (kbd "s-]") )
;;(global-set-key (kbd "s-}") )
;;(global-set-key (kbd "s-a") 'mark-whole-buffer))
;;(global-set-key (kbd "s-s") 'ns-write-file-using-panel)
;;(global-set-key (kbd "s-d") 'isearch-repeat-backward)
;;(global-set-key (kbd "s-D") 'dired)
;;(global-set-key (kbd "s-f") 'isearch-forward)
;;(global-set-key (kbd "s-g") 'isearch-repeat-forward)
;;(global-set-key (kbd "s-h") 'ns-do-hide-emacs)
;;(global-set-key (kbd "s-H") 'ns-do-hide-others)
;;(global-set-key (kbd "s-j") 'exchange-point-and-mark)
;;(global-set-key (kbd "s-k") 'kill-current-buffer)
;;(global-set-key (kbd "s-l") 'goto-line)
;;(global-set-key (kbd "s-L") 'shell-command)
;;(global-set-key (kbd "s-;") )
;;(global-set-key (kbd "s-:") 'ispell)
;;(global-set-key (kbd "s-'") 'next-window-any-frame)
;;(global-set-key (kbd "s-"") 'next-window-any-frame)
;;(global-set-key (kbd "s-z") 'undo)
;;(global-set-key (kbd "s-x") 'kill-region)
;;(global-set-key (kbd "s-c") 'ns-copy-including-secondary)
;;(global-set-key (kbd "s-C") 'ns-popup-color-panel)
;;(global-set-key (kbd "s-v") 'yank)
;;(global-set-key (kbd "s-b") )
;;(global-set-key (kbd "s-n") 'make-frame)
;;(global-set-key (kbd "s-m") 'iconify-frame)
;;(global-set-key (kbd "s-M") 'manual-entry)
;;(global-set-key (kbd "s-,") 'customize)
;;(global-set-key (kbd "s-<") )
;;(global-set-key (kbd "s-.") )
;;(global-set-key (kbd "s->") )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment