diff --git a/modules/config/default/config.el b/modules/config/default/config.el index d95b893d1..ad442f679 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -184,8 +184,6 @@ :g "s-/" (λ! (save-excursion (comment-line 1))) :n "s-/" #'evil-commentary-line :v "s-/" #'evil-commentary - :gni [s-return] #'+default/newline-below - :gni [S-s-return] #'+default/newline-above :gi [s-backspace] #'doom/backward-kill-to-bol-and-indent :gi [s-left] #'doom/backward-to-bol-or-indent :gi [s-right] #'doom/forward-to-last-non-comment-or-eol @@ -217,7 +215,7 @@ ;; Unbind `help-for-help'. Conflicts with which-key's help command for the ;; h prefix. It's already on ? and F1 anyway. - "C-h" nil + "C-h" nil ;; replacement keybinds ;; replaces `info-emacs-manual' b/c it's on C-m now @@ -229,7 +227,7 @@ "re" #'doom/reload-env ;; replaces `apropos-documentation' b/c `apropos' covers this - "d" nil + "d" nil "d/" #'doom/help-search "da" #'doom/help-autodefs "db" #'doom/report-bug @@ -288,12 +286,19 @@ ;; it will ignore comments+trailing whitespace before jumping to eol. (map! :gi "C-a" #'doom/backward-to-bol-or-indent :gi "C-e" #'doom/forward-to-last-non-comment-or-eol - ;; Standardize the behavior of M-RET/M-S-RET as a "add new item - ;; below/above" key. - :gni [M-return] #'+default/newline-below - :gni [M-S-return] #'+default/newline-above + ;; Standardizes the behavior of modified RET to match the behavior of + ;; other editors, particularly Atom, textedit, textmate, and vscode, in + ;; which ctrl+RET will add a new "item" below the current one and + ;; cmd+RET (Mac) / meta+RET (elsewhere) will add a new, blank line below + ;; the current one. :gni [C-return] #'+default/newline-below - :gni [C-S-return] #'+default/newline-above)) + :gni [C-S-return] #'+default/newline-above + (:when IS-MAC + :gni [s-return] #'+default/newline-below + :gni [S-s-return] #'+default/newline-above) + (:unless IS-MAC + :gni [M-return] #'+default/newline-below + :gni [M-S-return] #'+default/newline-above))) ;;