diff --git a/modules/config/default/autoload/text.el b/modules/config/default/autoload/text.el index 2138b7d8b..7a857f6ef 100644 --- a/modules/config/default/autoload/text.el +++ b/modules/config/default/autoload/text.el @@ -1,8 +1,5 @@ ;;; config/default/autoload/text.el -*- lexical-binding: t; -*- -;;;###autoload -(defalias '+default/newline #'electric-indent-just-newline) - ;;;###autoload (defun +default/newline-above () "Insert an indented new line before the current one." diff --git a/modules/config/default/config.el b/modules/config/default/config.el index ff2eb6217..325ae1096 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -544,9 +544,9 @@ Continues comments if executed from a commented line." :gi "TAB" cmds-tab :gi [tab] cmds-tab)) - ;; Smarter C-a/C-e for both Emacs and Evil. C-a will jump to indentation. - ;; Pressing it again will send you to the true bol. Same goes for C-e, except - ;; it will ignore comments+trailing whitespace before jumping to eol. + ;; Smarter readline keybinds (C-a/C-e) for both Emacs and Evil. Changes C-a to + ;; also cycle between true BOL and BOI (indentation). Same for C-e, but with + ;; EOL and EOI (ignoring comments+trailing whitespace). (map! :gi "C-a" #'doom/backward-to-bol-or-indent :gi "C-e" #'doom/forward-to-last-non-comment-or-eol ;; Standardizes the behavior of modified RET to match the behavior of @@ -559,12 +559,9 @@ Continues comments if executed from a commented line." ;; C- = text scale decrease [C-down-mouse-2] (cmd! (text-scale-set 0)) - ;; auto-indent on newline by default - :gi [remap newline] #'newline-and-indent - ;; insert literal newline - :i "S-RET" #'+default/newline - :i [S-return] #'+default/newline - :i "C-j" #'+default/newline + ;; Do opposite of `electric-indent-mode' + :i "S-RET" #'electric-newline-and-maybe-indent + :i [S-return] #'electric-newline-and-maybe-indent ;; Add new item below current (without splitting current line). :gi "C-RET" #'+default/newline-below