Start moving away from Org mode
This commit is contained in:
parent
686ce4b560
commit
f6bd936f91
6 changed files with 287 additions and 3 deletions
2
emacs/.emacs.d/.gitignore
vendored
2
emacs/.emacs.d/.gitignore
vendored
|
@ -1,3 +1 @@
|
||||||
init.el
|
|
||||||
|
|
||||||
.python-environments
|
.python-environments
|
||||||
|
|
151
emacs/.emacs.d/init.el
Normal file
151
emacs/.emacs.d/init.el
Normal file
|
@ -0,0 +1,151 @@
|
||||||
|
;;; init.el --- Tom-Emacs Interface -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2018 Tom Willemse
|
||||||
|
|
||||||
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
|
;; Keywords: local
|
||||||
|
|
||||||
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; This is my Emacs configuration. It has gone through many iterations
|
||||||
|
;; before and may yet go through many more iterations.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'diminish) ; To hide minor mode lighters.
|
||||||
|
(require 'package) ; To load packages installed through ELPA.
|
||||||
|
|
||||||
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
|
|
||||||
|
;;;; Visual initialization:
|
||||||
|
|
||||||
|
;; In order to make the change from the default visuals to my
|
||||||
|
;; preferred setings as quick as possible, I put anything that will
|
||||||
|
;; have an immediate effect first.
|
||||||
|
|
||||||
|
(add-to-list 'custom-theme-load-path
|
||||||
|
(locate-user-emacs-file "local-lisp/yoshi-theme"))
|
||||||
|
|
||||||
|
(setq inhibit-startup-screen t)
|
||||||
|
|
||||||
|
(setq default-frame-alist
|
||||||
|
(append default-frame-alist
|
||||||
|
'((font . "Fantasque Sans Mono-15")
|
||||||
|
(internal-border-width . 15))))
|
||||||
|
|
||||||
|
(menu-bar-mode -1)
|
||||||
|
(tool-bar-mode -1)
|
||||||
|
(scroll-bar-mode -1)
|
||||||
|
|
||||||
|
(load-theme 'yoshi :no-confirm)
|
||||||
|
|
||||||
|
;;;; Rest:
|
||||||
|
|
||||||
|
(eval-and-compile
|
||||||
|
(mapc (lambda (d) (add-to-list 'load-path d))
|
||||||
|
(directory-files
|
||||||
|
(locate-user-emacs-file "vendor-lisp/") t "^[^.]"))
|
||||||
|
|
||||||
|
(add-to-list 'load-path (locate-user-emacs-file "local-lisp/"))
|
||||||
|
|
||||||
|
(let ((loaddefs (locate-user-emacs-file "local-lisp/autoloads.el")))
|
||||||
|
(when (file-exists-p loaddefs)
|
||||||
|
(load loaddefs))))
|
||||||
|
|
||||||
|
(setq package-archives
|
||||||
|
(append package-archives
|
||||||
|
'(("melpa" . "https://melpa.org/packages/")
|
||||||
|
("org" . "http://orgmode.org/elpa/"))))
|
||||||
|
|
||||||
|
(eval-and-compile (package-initialize))
|
||||||
|
|
||||||
|
(defvar init--backup-directory
|
||||||
|
(locate-user-emacs-file "data/backup-files/")
|
||||||
|
"The location for backup files.")
|
||||||
|
|
||||||
|
(defvar init--auto-save-directory
|
||||||
|
(locate-user-emacs-file "data/auto-save-files/")
|
||||||
|
"The location for auto-save files.")
|
||||||
|
|
||||||
|
(defvar init--auto-save-list-prefix
|
||||||
|
(locate-user-emacs-file "data/auto-save-list/.saves-")
|
||||||
|
"Prefix for auto-save list files.")
|
||||||
|
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
|
||||||
|
|
||||||
|
(add-to-list 'auto-save-file-name-transforms
|
||||||
|
`(".*" ,init--auto-save-directory t) :append)
|
||||||
|
|
||||||
|
(setq auto-save-list-file-prefix init--auto-save-list-prefix)
|
||||||
|
|
||||||
|
(setq backup-directory-alist `((".*" . ,init--backup-directory)))
|
||||||
|
|
||||||
|
(setq-default cursor-type '(bar . 2))
|
||||||
|
|
||||||
|
(setq indent-tabs-mode nil)
|
||||||
|
|
||||||
|
(setq require-final-newline t)
|
||||||
|
|
||||||
|
(setq sentence-end-double-space nil)
|
||||||
|
|
||||||
|
(setq-default tab-width 4)
|
||||||
|
|
||||||
|
(setq-default truncate-lines t)
|
||||||
|
|
||||||
|
(setq user-full-name "Tom Willemse")
|
||||||
|
(setq user-mail-address "tom@ryuslash.org")
|
||||||
|
|
||||||
|
(global-set-key (kbd "C-M-SPC") 'er/expand-region)
|
||||||
|
(global-set-key (kbd "C-c (") 'embrace-commander)
|
||||||
|
(global-set-key (kbd "C-c m") 'oni-hydra-magit/body)
|
||||||
|
(global-set-key (kbd "C-c o") 'oni-hydra-org/body)
|
||||||
|
(global-set-key (kbd "M-+") 'mc/mark-next-like-this)
|
||||||
|
|
||||||
|
(global-unset-key (kbd "C-z"))
|
||||||
|
|
||||||
|
(show-paren-mode)
|
||||||
|
|
||||||
|
;;;; Destroy trailing whitespace:
|
||||||
|
|
||||||
|
(require 'destroy-trailing-whitespace)
|
||||||
|
(global-destroy-trailing-whitespace-mode)
|
||||||
|
|
||||||
|
;;;; Ivy:
|
||||||
|
|
||||||
|
(require 'ivy)
|
||||||
|
|
||||||
|
(ivy-mode)
|
||||||
|
|
||||||
|
(diminish 'ivy-mode)
|
||||||
|
|
||||||
|
;;;; Counsel:
|
||||||
|
|
||||||
|
(require 'counsel)
|
||||||
|
|
||||||
|
(setq counsel-find-file-ignore-regexp
|
||||||
|
(rx (or (and bos ".")
|
||||||
|
(and ".zwc" eos))))
|
||||||
|
|
||||||
|
(counsel-mode)
|
||||||
|
|
||||||
|
(diminish 'counsel-mode)
|
||||||
|
|
||||||
|
;;;; Lazy configurations:
|
||||||
|
|
||||||
|
(with-eval-after-load 'bookmark (load "init/oni-bookmarks"))
|
||||||
|
|
||||||
|
(provide 'init)
|
||||||
|
;;; init.el ends here
|
1
emacs/.emacs.d/init/.gitignore
vendored
1
emacs/.emacs.d/init/.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
*.el
|
|
32
emacs/.emacs.d/init/oni-align.el
Normal file
32
emacs/.emacs.d/init/oni-align.el
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
;;; oni-align.el --- Alignment configuration -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2018 Tom Willemse
|
||||||
|
|
||||||
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
|
;; Keywords: local
|
||||||
|
|
||||||
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; Configuration for several alignment options.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'align)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(provide 'oni-align)
|
||||||
|
;;; oni-align.el ends here
|
38
emacs/.emacs.d/init/oni-bookmarks.el
Normal file
38
emacs/.emacs.d/init/oni-bookmarks.el
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
;;; oni-bookmarks.el --- Bookmarks settings -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2018 Tom Willemse
|
||||||
|
|
||||||
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
|
;; Keywords: local
|
||||||
|
|
||||||
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; Settings for `bookmarks.el'. Keeping these in the main file will
|
||||||
|
;; make the byte compiler complain, or require ugly code to shut it
|
||||||
|
;; up.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'bookmark)
|
||||||
|
|
||||||
|
(defvar oni-bookmarks--bookmark-file-location
|
||||||
|
(locate-user-emacs-file "data/bookmarks")
|
||||||
|
"The location for Emacs bookmarks.")
|
||||||
|
|
||||||
|
(setq bookmark-default-file oni-bookmarks--bookmark-file-location)
|
||||||
|
|
||||||
|
(provide 'oni-bookmarks)
|
||||||
|
;;; oni-bookmarks.el ends here
|
66
emacs/.emacs.d/local-lisp/destroy-trailing-whitespace.el
Normal file
66
emacs/.emacs.d/local-lisp/destroy-trailing-whitespace.el
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
;;; destroy-trailing-whitespace.el --- Destroy all trailing whitespace -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2016 Tom Willemse
|
||||||
|
|
||||||
|
;; Author: Tom Willemse <chelys@drd>
|
||||||
|
;; Keywords: convenience
|
||||||
|
|
||||||
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; This library offers a single mode that will delete all trailing
|
||||||
|
;; whitespace before saving any file. It tries to be intelligent
|
||||||
|
;; enough to only do this for modes where trailing whitespace is not
|
||||||
|
;; meaningful. Currently it only keeps whitespace around in
|
||||||
|
;; `markdown-mode' since it uses two spaces at the end of a line to
|
||||||
|
;; signify a line break.
|
||||||
|
;;
|
||||||
|
;; To use this mode in all buffers, add the following to your init
|
||||||
|
;; file:
|
||||||
|
;;
|
||||||
|
;; (require 'destroy-trailing-whitespace)
|
||||||
|
;; (global-destroy-trailing-whitespace-mode)
|
||||||
|
;;
|
||||||
|
;; To use this mode in just some buffers add it to your preferred
|
||||||
|
;; hook. For example, to use it only in `prog-mode' buffers:
|
||||||
|
;;
|
||||||
|
;; (require 'destroy-trailing-whitespace)
|
||||||
|
;; (add-hook 'prog-mode-hook 'destroy-trailing-whitespace-mode)
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(defun destroy-trailing-whitespace ()
|
||||||
|
"Delete trailing whitespace everywhere, except in Markdown buffers."
|
||||||
|
(if (not (eq major-mode 'markdown-mode))
|
||||||
|
(delete-trailing-whitespace)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(define-minor-mode destroy-trailing-whitespace-mode
|
||||||
|
"Destroy all trailing whitespace before saving the buffer."
|
||||||
|
:lighter ""
|
||||||
|
(if destroy-trailing-whitespace-mode
|
||||||
|
(add-hook 'before-save-hook 'delete-trailing-whitespace nil :local)
|
||||||
|
(remove-hook 'before-save-hook 'delete-trailing-whitespace :local)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(define-minor-mode global-destroy-trailing-whitespace-mode
|
||||||
|
"Destroy all trailing whitespace before saving any open buffer."
|
||||||
|
:lighter "" :global t
|
||||||
|
(if global-destroy-trailing-whitespace-mode
|
||||||
|
(add-hook 'before-save-hook 'destroy-trailing-whitespace)
|
||||||
|
(remove-hook 'before-save-hook 'destroy-trailing-whitespace)))
|
||||||
|
|
||||||
|
(provide 'destroy-trailing-whitespace)
|
||||||
|
;;; destroy-trailing-whitespace.el ends here
|
Loading…
Reference in a new issue