102 lines
3.3 KiB
EmacsLisp
102 lines
3.3 KiB
EmacsLisp
;; -*- coding: utf-8 -*-
|
|
|
|
|
|
;; Added by Package.el. This must come before configurations of
|
|
;; installed packages. Don't delete this line. If you don't want it,
|
|
;; just comment it out by adding a semicolon to the start of the line.
|
|
;; You may delete these explanatory comments.
|
|
(package-initialize)
|
|
(custom-set-variables
|
|
;; custom-set-variables was added by Custom.
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
;; Your init file should contain only one such instance.
|
|
;; If there is more than one, they won't work right.
|
|
'(custom-safe-themes
|
|
(quote
|
|
("4515feff287a98863b7b7f762197a78a7c2bfb6ec93879e7284dff184419268c" default)))
|
|
'(display-time-world-list
|
|
(quote
|
|
(("America/New_York" "New York")
|
|
("America/Los_Angeles" "Los Angeles")
|
|
("America/Nassau" "Nassau")
|
|
("Europe/Istanbul" "Istanbul")
|
|
("Europe/London" "London")
|
|
("Europe/Berlin" "Berlin")
|
|
("Asia/Shanghai" "China")
|
|
("Asia/Tokyo" "Tokyo"))))
|
|
'(font-lock-maximum-decoration (quote ((ReST . 0))))
|
|
'(global-font-lock-mode nil)
|
|
'(global-hl-line-mode nil)
|
|
'(newsticker-url-list
|
|
(quote
|
|
(("bbc" "https://feeds.bbci.co.uk/news/world/rss.xml" nil nil nil)
|
|
("nzz" "https://www.nzz.ch/recent.rss" nil nil nil)
|
|
("datacamp" "https://www.datacamp.com/community/rss.xml" nil nil nil)))))
|
|
|
|
(custom-set-faces
|
|
;; custom-set-faces was added by Custom.
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
;; Your init file should contain only one such instance.
|
|
;; If there is more than one, they won't work right.
|
|
)
|
|
|
|
(add-to-list 'custom-theme-load-path (expand-file-name "~/.emacs.d/bundle/nord-theme/"))
|
|
(load-theme 'nord t)
|
|
|
|
;; load paths
|
|
(add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle"))
|
|
(autoload 'fill-column-indicator "~/.emacs.d/bundle/fill-column-indicator.el")
|
|
|
|
(add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle/markdown-mode"))
|
|
(add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle/linum-relative"))
|
|
|
|
;; required packages
|
|
(require 'markdown-mode)
|
|
(require 'linum-relative)
|
|
|
|
;; configurations
|
|
(setq-default indent-tabs-mode nil)
|
|
(setq-default fill-column 72)
|
|
(setq visible-bell 1)
|
|
(setq linum-relative-backend 'display-line-numbers-mode)
|
|
(setq require-final-newline t)
|
|
(setq font-lock-maximum-decoration t)
|
|
;;(setq inhibit-startup-screen t initial-buffer-choice t)
|
|
|
|
;; set modes
|
|
(line-number-mode -1)
|
|
(column-number-mode -1)
|
|
(blink-cursor-mode -1)
|
|
(display-battery-mode -1)
|
|
(display-time-mode 1)
|
|
(size-indication-mode -1)
|
|
|
|
;; UTF-8 FTW
|
|
(prefer-coding-system 'utf-8)
|
|
(set-keyboard-coding-system 'utf-8)
|
|
(set-terminal-coding-system 'utf-8)
|
|
|
|
;; nuke trailing whitespace when writing to a file
|
|
(add-hook 'write-file-hooks 'delete-trailing-whitespace)
|
|
(add-hook 'org-mode-hook 'turn-on-font-lock)
|
|
(add-hook 'markdown-mode-hook 'turn-on-font-lock)
|
|
(add-hook 'python-mode-hook 'turn-on-font-lock)
|
|
|
|
;; I got sick of typing "yes"
|
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
|
|
|
;; Turn off chrome
|
|
(dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode))
|
|
(when (fboundp mode) (funcall mode -1)))
|
|
|
|
;; start a server, unless one is already running
|
|
(when (require 'server nil t) (unless (server-running-p) (server-start)))
|
|
|
|
;; custom packages
|
|
(require 'darwin-customs)
|
|
(require 'windows-customs)
|
|
|
|
(defun copy-whole-buffer ()
|
|
"Copy entire buffer to clipboard"
|
|
(interactive)
|
|
(clipboard-kill-ring-save (point-min) (point-max)))
|