In Emacs using ESS for editing R files, want to stop this from happening when I hit enter:
I understand convention is to use ### for left-aligned comments, ## for block-aligned comments, and # for these right-adjusted comments, per here, but I'm looking to disable the latter.
I understand from other answers, it is common to encourage simply not using single comments #
, but how would I achieve this anyway?
This is in my init.el:
(setq ess-smart-S-assign-key nil)
;; (ess-toggle-S-assign nil)
(setq ess-indent-with-fancy-comments nil)
(setq ess-fancy-comments nil)
(require 'ess)
(show-paren-mode 1)
;; (autoload 'R-mode "ess-site.el" "" t)
(add-to-list 'auto-mode-alist '("\\.R\\'" . R-mode))
;; (ess-toggle-underscore nil)
(defun my-ess-settings ()
(setq ess-indent-with-fancy-comments nil))
(add-hook 'ess-mode-hook #'my-ess-settings)
(add-hook 'ess-mode-hook
(lambda ()
(local-set-key (kbd "RET") 'newline)))
which I have seen recommended as a way of disabling this, but still I see the behavior above in my gif.