Skip to content

Instantly share code, notes, and snippets.

Created March 28, 2020 15:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
basic emacs setup
;; packaging
(require 'package)
(setq package-archives '(("gnu" . "")
("melpa" . "")
("melpa-stable" . ""))
'(("melpa-stable" . 10)
("gnu" . 5)
("melpa" . 0)))
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil 'noerror)
(let (el-get-master-branch)
(goto-char (point-max))
(el-get 'sync)
;;hold packages
(add-to-list 'package-pinned-packages '(cider . "melpa-stable") t)
(add-to-list 'package-pinned-packages '(alchemist . "melpa-stable") t)
(add-to-list 'package-pinned-packages '(jedi . "melpa-stable") t)
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
;; compile not compiled files
;; (byte-recompile-directory (expand-file-name "~/.emacs.d") 0)
;; func to load other init files
(defconst user-init-dir
(cond ((boundp 'user-emacs-directory)
((boundp 'user-init-directory)
(t "~/.emacs.d/")))
(defun load-user-file (file)
(interactive "f")
"Load a file in current user's configuration directory"
(load-file (expand-file-name file user-init-dir)))
;; "y or n" instead of "yes or no"
(fset 'yes-or-no-p 'y-or-n-p)
;; Don't show the startup screen
(setq inhibit-startup-message t)
;; turn of hells bells
(setq ring-bell-function 'ignore)
;; no menu bar
(menu-bar-mode -1)
;; no toolbar
;; (tool-bar-mode -1)
;; no scrollbar
;; (scroll-bar-mode -1)
;; don't fuck w/ my scratches
(setq initial-scratch-message ";; evaluate & print C-j
;; evaluate defun C-M-x
;;save on exit
(desktop-save-mode 1)
;;sync buffers on disk change
(global-auto-revert-mode t)
;; Display line and column numbers
(setq column-number-mode t)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment