emacs/config/editor.el

18 lines
779 B
EmacsLisp
Raw Normal View History

2025-01-30 10:47:07 +07:00
;; For example, set the default tab width to 4 spaces
(setq-default tab-width 4)
;; For Python mode, set the indentation style
(add-hook 'python-mode-hook
(lambda ()
(setq indent-tabs-mode nil) ; Use spaces instead of tabs
(setq python-indent-offset 4) )) ; Set the indentation offset
;; For JavaScript mode, set the indentation style
(add-hook 'js-mode-hook
(lambda ()
(setq indent-tabs-mode nil) ; Use spaces instead of tabs
(setq js-indent-level 4))) ; Set the indentation offset
;; For HTML mode, set the indentation style
(add-hook 'html-mode-hook
(lambda ()
(setq indent-tabs-mode nil) ; Use spaces instead of tabs
(setq js-indent-level 4))) ; Set the indentation offset