Skip to content

Instantly share code, notes, and snippets.

@mikelove
Last active April 25, 2025 18:48
Show Gist options
  • Save mikelove/b0f4eb15a21387ddb534 to your computer and use it in GitHub Desktop.
Save mikelove/b0f4eb15a21387ddb534 to your computer and use it in GitHub Desktop.
.emacs
; mike love's .emacs
; general stuff
(menu-bar-mode -1)
(global-set-key "\C-x\C-b" 'electric-buffer-list)
(global-unset-key (kbd "\C-x DEL") )
(global-unset-key (kbd "\C-t") )
(setq-default fill-column 80)
(setq inhibit-startup-screen t)
(setq backup-directory-alist '(("" . "~/emacs-backup")))
(delete-selection-mode 1)
(setq scroll-conservatively 1000)
(require 'uniquify)
(setq uniquify-buffer-name-style 'reverse)
(setq ring-bell-function 'ignore)
(display-time-mode 1)
; theme
;(load-theme 'gruvbox-light-hard t)
;(load-theme 'gruvbox-dark-hard t)
;(load-theme 'tango-dark)
;(load-theme 'cyberpunk t)
;(add-to-list 'custom-theme-load-path "~/emacs/emacs-color-theme-solarized")
;(customize-set-variable 'frame-background-mode 'light)
;(load-theme 'solarized-light t)
;(add-to-list 'custom-theme-load-path "~/emacs/spacedust")
;(load-theme 'spacedust t)
;(load-theme 'material t)
(load-theme 'monokai t)
; powerline
(add-to-list 'load-path "~/emacs/powerline")
(require 'powerline)
(powerline-default-theme)
; text mode hooks
(add-hook 'text-mode-hook 'turn-on-auto-fill)
;; ESS (Emacs Speaks Statistics) stuff
(setq ess-indent-with-fancy-comments nil)
(setq ess-style 'RStudio)
(setq ess-history-file nil)
(setq inferior-R-args "--no-restore --no-save")
(setq ess-ask-for-ess-directory nil)
(setq ess-startup-directory nil)
;; quarto mode
(require 'quarto-mode)
; line numbers when markdown or R script
(add-hook 'markdown-mode-hook 'display-line-numbers-mode)
(add-hook 'ess-r-mode-hook 'display-line-numbers-mode)
; snake-mode
(add-to-list 'auto-mode-alist '("Snakefile" . python-mode))
; auto-complete - requires installing 'auto-complete' package via MELPA
;(ac-config-default)
; markdown and polymode stuff (for using Rmd files)
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.Rmd\\'" . poly-markdown-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment