Skip to content

Instantly share code, notes, and snippets.

@fdelbos
Last active July 6, 2018 08:10
Show Gist options
  • Save fdelbos/d139140f22b02e73074da7426ecd1889 to your computer and use it in GitHub Desktop.
Save fdelbos/d139140f22b02e73074da7426ecd1889 to your computer and use it in GitHub Desktop.
be .emacs
;; melpa
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
;; theme
(load-theme 'manoj-dark)
(global-linum-mode t)
(setq linum-format "%d ")
;; do not beep
(setq visible-bell t)
(line-number-mode 1)
(column-number-mode 1)
(global-font-lock-mode t)
(setq font-lock-maximum-size nil)
(setq-default transient-mark-mode t)
;; remove menu bar
(menu-bar-mode -1)
;; no temp files
(setq backup-inhibited t)
(setq auto-save-default nil)
;; not startup messages
(setq inhibit-startup-message t)
(load-library "paren")
(show-paren-mode 1)
(transient-mark-mode t)
(setq make-backup-files nil
backup-inhibited t)
;; abbrev anwer
(fset 'yes-or-no-p 'y-or-n-p)
(setq next-line-add-newlines nil)
(display-time)
(setq show-trailing-whitespace t)
;; smartparens: matches parens
(require 'smartparens-config)
(smartparens-global-mode t)
;; go stuffs
(require 'go-mode)
(require 'go-autocomplete)
(add-hook 'go-mode-hook
(lambda ()
(setq gofmt-command "goimports")
(add-hook 'before-save-hook 'gofmt-before-save)
(setq tab-width 4)
(setq indent-tabs-mode 1)))
(require 'auto-complete-config)
(ac-config-default)
;; markdown
(require 'markdown-mode)
;; org mode
(require 'org)
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
;; change window with: shift+arrow
(when (fboundp 'windmove-default-keybindings)
(windmove-default-keybindings))
;; beacon: flash the cursor on scroll
(beacon-mode 1)
;; mode line colors
(set-face-attribute 'mode-line-buffer-id nil :foreground "white" :background "DarkViolet")
(set-face-foreground 'mode-line "LightGreen")
(set-face-background 'mode-line "DarkOrchid4")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment