Merge pull request #1147 from seanfarley/smf/bindings
More MacOS bindings
This commit is contained in:
commit
bd9df22f99
2 changed files with 16 additions and 0 deletions
|
@ -270,6 +270,16 @@ Respects `require-final-newline'."
|
|||
(when (looking-at "\n+")
|
||||
(replace-match "")))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/toggle-comment-region-or-line ()
|
||||
"Comments or uncomments the whole region or if no region is
|
||||
selected, then the current line."
|
||||
(interactive)
|
||||
(let (beg end)
|
||||
(if (region-active-p)
|
||||
(setq beg (region-beginning) end (region-end))
|
||||
(setq beg (line-beginning-position) end (line-end-position)))
|
||||
(comment-or-uncomment-region beg end)))
|
||||
|
||||
;;
|
||||
;; Advice
|
||||
|
|
|
@ -139,9 +139,14 @@
|
|||
"s-n" #'+default/new-buffer
|
||||
"s-N" #'make-frame
|
||||
"s-q" (if (daemonp) #'delete-frame #'save-buffers-kill-terminal)
|
||||
"C-s-f" #'toggle-frame-fullscreen
|
||||
;; Restore somewhat common navigation
|
||||
"s-l" #'goto-line
|
||||
;; Restore OS undo, save, copy, & paste keys (without cua-mode, because
|
||||
;; it imposes some other functionality and overhead we don't need)
|
||||
"s-f" #'swiper
|
||||
"s-z" #'undo
|
||||
"s-Z" #'redo
|
||||
"s-c" (if (featurep 'evil) #'evil-yank #'copy-region-as-kill)
|
||||
"s-v" #'yank
|
||||
"s-s" #'save-buffer
|
||||
|
@ -151,6 +156,7 @@
|
|||
"s--" #'text-scale-decrease
|
||||
;; Conventional text-editing keys & motions
|
||||
"s-a" #'mark-whole-buffer
|
||||
"s-/" #'doom/toggle-comment-region-or-line
|
||||
:gi [s-return] #'+default/newline-below
|
||||
:gi [s-S-return] #'+default/newline-above
|
||||
:gi [s-backspace] #'doom/backward-kill-to-bol-and-indent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue