Skip to content

Instantly share code, notes, and snippets.

@stzr1123
Last active November 30, 2017 19:29
Show Gist options
  • Save stzr1123/e4d5dd0da14e52ee3aef6ee0a275a2b8 to your computer and use it in GitHub Desktop.
Save stzr1123/e4d5dd0da14e52ee3aef6ee0a275a2b8 to your computer and use it in GitHub Desktop.
emacs profile
;; global variables
(setq
create-lockfiles nil
scroll-error-top-bottom t
use-package-always-ensure t
make-backup-files nil)
;; This is to remove ugly toolbar
(custom-set-variables
'(tool-bar-mode nil))
;; This is to add line numbers
(global-linum-mode t)
;; This is to fix tabs
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(customize-variable (quote tab-stop-list))
;; This is to add a little more spacing in lines
(setq-default line-spacing 3)
;; This is to make background color light gray
;(add-to-list 'default-frame-alist '(background-color . "#f1f1f1"))
;; This is to make background color black #272822
(add-to-list 'default-frame-alist '(background-color . "#26292c"))
;; This is to make foreground color white
(add-to-list 'default-frame-alist '(foreground-color . "#f5f5f5"))
;; This is so emacs reopens last session on startup
;; (desktop-save-mode 1)
;; This is to disable the scroll bars
(scroll-bar-mode -1)
;; This is so files reload automatically from disk
(global-auto-revert-mode 1)
;; the package manager
(require 'package)
(setq
package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("org" . "http://orgmode.org/elpa/")
("melpa" . "http://melpa.org/packages/")
("melpa-stable" . "http://stable.melpa.org/packages/")))
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
;; scala mode
(use-package scala-mode
:interpreter
("scala" . scala-mode))
;; scroll one line at a time (less "jumpy" than defaults)
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time
(setq mouse-wheel-progressive-speed nil) ;; don't accelerate scrolling
(setq mouse-wheel-follow-mouse 't) ;; scroll window under mouse
(setq scroll-step 1) ;; keyboard scroll one line at a time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment