#+TITLE: My Personal Init Customization
#+OPTIONS: toc:nil num:nil ^:nil
* copyright
-# Copyright (C) 2016 Ian Kelling
+# Copyright (C) 2017 Ian Kelling
# 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
+* TODO keybinds to remember
+
+keys worth memorizing
+
+c-2
+c-m-3
+
+s-return
+
+in isearch, C-o
+isearch-occur
+
+org, C-c / t
+make just todo items visible
+
+C-mouse-1
+buffer list menu
+
+C-up/down
+move up/down fast
+
+M-right-scroll
+forward/back sexp
+
+C-M-right-scroll
+scroll
+
+C-S-scroll
+change text size
+
+how to control+left scroll on kinesis
+right shift = control
+
+C-left-scroll
+forward/backward word
+
+C-M-d
+swap buffers across windows
+
+
+
* TODO learn some more ivy mode stuff
* TODO declarative package installations,
with documentation.
#+begin_src emacs-lisp
- (defun override-theme (arg)
- (interactive)
- (while custom-enabled-themes
- (disable-theme (car custom-enabled-themes)))
- (load-theme arg t))
- (setq color-theme-is-global t)
-
- (defun toggle-night ()
- (interactive)
- (if (equal (car custom-enabled-themes) 'naquadah)
- (override-theme 'leuven)
- (override-theme 'naquadah)))
-
+(defun override-theme (arg)
+ (interactive)
+ (while custom-enabled-themes
+ (disable-theme (car custom-enabled-themes)))
+ (load-theme arg t))
+(setq color-theme-is-global t)
- (override-theme 'leuven) ;; org mode features, with monitor darkened. part of org-mode i think
+(defun toggle-night ()
+ (interactive)
+ (cond ((equal (car custom-enabled-themes) 'naquadah)
+ ;; background off white to be better on the eyes. took this
+ ;; color from gitweb.
+ (custom-set-faces `(default ((t (:background "#F6F6F0")))))
+ (override-theme 'leuven))
+ (t
+ ;; revert previous background change
+ (custom-set-faces `(default ((t (:background nil)))))
+ (override-theme 'naquadah))))
+(custom-set-faces `(default ((t (:background "#F6F6F0")))))
+(override-theme 'leuven) ;; org mode features, with monitor darkened. part of org-mode i think
- ;; disable color thing with this:
- ;;(disable-theme (car custom-enabled-themes))
+;; disable color thing with this:
+;;(disable-theme (car custom-enabled-themes))
- ;; decent dark themes
+;; decent dark themes
- ;;(override-theme 'tangotango)
- ;;(override-theme 'deeper-blue)
- ;;(override-theme 'tango-dark)
- ;;(override-theme 'tsdh-dark)
+;;(override-theme 'tangotango)
+;;(override-theme 'deeper-blue)
+;;(override-theme 'tango-dark)
+;;(override-theme 'tsdh-dark)
- ;;(override-theme 'heroku)
- ;;(override-theme 'inkpot) ;; part of inkpot-theme package
- ;;(override-theme 'naquadah) ; org mode features, part of naquadah-theme package
- ;;(override-theme 'spolsky) ;; part of sublime-themes package
- ;;(override-theme 'twilight-anti-bright) ;; from twilight-anti-bright-theme package
+;;(override-theme 'heroku)
+;;(override-theme 'inkpot) ;; part of inkpot-theme package
+;;(override-theme 'naquadah) ; org mode features, part of naquadah-theme package
+;;(override-theme 'spolsky) ;; part of sublime-themes package
+;;(override-theme 'twilight-anti-bright) ;; from twilight-anti-bright-theme package
- ;; interesting but not usable colors
- ;;(override-theme 'cyberpunk) ; cool org mode features, from cyberpunk-theme package
- ;;(override-theme 'wombat) ; cursor not visible enough. from a wombat package, not sure which
- ;;(override-theme 'misterioso) ; cursor not visible enough
+;; interesting but not usable colors
+;;(override-theme 'cyberpunk) ; cool org mode features, from cyberpunk-theme package
+;;(override-theme 'wombat) ; cursor not visible enough. from a wombat package, not sure which
+;;(override-theme 'misterioso) ; cursor not visible enough
- ;;decent light themes
- ;;(override-theme 'alect-light) ; theres a -alt version, don't see a dif. could use this without dimming. from alect-something package
- ;;(override-theme 'occidental) ; from occidental-theme package
+;;decent light themes
+;;(override-theme 'alect-light) ; theres a -alt version, don't see a dif. could use this without dimming. from alect-something package
+;;(override-theme 'occidental) ; from occidental-theme package
- ;;color-theme is deprecated in emacs 24.
+;;color-theme is deprecated in emacs 24.
;; theme packages i tried then removed:
;; ignored ones that didn't use the new theme engine
*** C-9]
delete-window-or-exit
#+begin_src emacs-lisp
- (global-set-key (kbd "C-9") 'delete-window-or-exit)
-
- (defun delete-window-or-exit ()
- "Delete window or exit emacs."
- (interactive)
- (if (condition-case nil (delete-window) (error t))
- (if (or (boundp 'server-process) (> (length (frame-list)) 1))
- (delete-frame)
- (save-buffers-kill-terminal t))))
+(global-set-key (kbd "C-9") 'delete-window-or-exit)
+(defun delete-window-or-exit ()
+ "Delete window or exit emacs."
+ (interactive)
+ (if (condition-case nil (delete-window) (error t))
+ (if (or (boundp 'server-process) (> (length (frame-list)) 1))
+ (progn (basic-save-buffer) (delete-frame))
+ (save-buffers-kill-terminal t))))
#+end_src
*** M-9]
kill-buffer
*** C-M-9]
end server edit
- ,save & kill buffer it was opened externally via emacsclient
+ ,save & kill buffer if it was opened externally via emacsclient
#+begin_src emacs-lisp
(defun server-edit-save ()
(interactive)
(beginning-of-line)
(let ((beg (point)))
- (insert "Copyright (C) 2016 Ian Kelling\nThis program is under GPL v. 3 or later, see <http://www.gnu.org/licenses/>")
+ (insert "Copyright (C) 2017 Ian Kelling\nThis program is under GPL v. 3 or later, see <http://www.gnu.org/licenses/>")
(comment-region beg (point))))
(global-set-key (kbd "C-M-6") 'insert-small-copyright)
(interactive)
(beginning-of-line)
(let ((beg (point)))
- (insert "Copyright (C) 2016 Ian Kelling\n")
+ (insert "Copyright (C) 2017 Ian Kelling\n")
(insert "\n")
(insert "This program is free software: you can redistribute it and/or modify\n")
(insert "it under the terms of the GNU General Public License as published by\n")
(interactive)
(beginning-of-line)
(let ((beg (point)))
- (insert "Copyright (C) 2016 Ian Kelling\n")
+ (insert "Copyright (C) 2017 Ian Kelling\n")
(insert "\n")
(insert "Licensed under the Apache License, Version 2.0 (the \"License\");\n")
(insert "you may not use this file except in compliance with the License.\n")