dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 50da98791f0ca25f684b573c7332a2b2af29bf58
parent 49260ca050203c003ece5ecced4e1da04eadefd6
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Mon, 12 Dec 2016 15:47:13 +0200

Merge remote-tracking branch 'gitlab-tau/master' into dev

Diffstat:
Memacs/emacs | 113+++----------------------------------------------------------------------------
Aemacs/init.el | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aemacs/myinit.org | 240+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 301 insertions(+), 109 deletions(-)

diff --git a/emacs/emacs b/emacs/emacs @@ -1,117 +1,12 @@ -(setq inhibit-startup-message t) - (require 'package) (setq package-enable-at-startup nil) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (package-initialize) +;; Bootstrap `use-package' (unless (package-installed-p 'use-package) - (package-refresh-contents) - (package-install 'use-package)) - -(use-package try - :ensure t) - -(use-package which-key - :ensure t - :config (which-key-mode)) - -(use-package evil - :ensure t - :config (evil-mode 1)) - -(use-package helm - :ensure t - :config (global-set-key (kbd "M-x") 'helm-M-x)) - -(use-package org-bullets - :ensure t - :config - (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))) - -(use-package ob-ipython - :ensure t) - -(use-package tabbar - :ensure t - :config - (tabbar-mode 1)) - -(use-package ace-window - :ensure t - :init - (progn - (global-set-key [remap other-window] 'ace-window) - (custom-set-faces - '(aw-leading-char-face - ((t (:inherit ace-jump-face-foreground :height 3.0))))))) - -(use-package swiper - :ensure t - :config - (progn - (ivy-mode 1) - (setq ivy-use-virtual-buffers t) - (global-set-key "\C-s" 'swiper) - (global-set-key (kbd "C-c C-r") 'ivy-resume) - (global-set-key (kbd "<f6>") 'ivy-resume) - (global-set-key (kbd "M-x") 'counsel-M-x) - (global-set-key (kbd "C-x C-f") 'counsel-find-file) - (global-set-key (kbd "<f1> f") 'counsel-describe-function) - (global-set-key (kbd "<f1> v") 'counsel-describe-variable) - (global-set-key (kbd "<f1> l") 'counsel-find-library) - (global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol) - (global-set-key (kbd "<f2> u") 'counsel-unicode-char) - (global-set-key (kbd "C-c g") 'counsel-git) - (global-set-key (kbd "C-c j") 'counsel-git-grep) - (global-set-key (kbd "C-c k") 'counsel-ag) - (global-set-key (kbd "C-x l") 'counsel-locate) - (global-set-key (kbd "C-S-o") 'counsel-rhythmbox) - (define-key read-expression-map (kbd "C-r") 'counsel-expression-history))) - -(winner-mode 1) -(windmove-default-keybindings) - -(setq ido-enable-flex-matching t) -(setq ido-everywhere t) - -(ido-mode 1) - -;(use-package elpy -; :ensure t -; :config (elpy-enable)) - -;(require 'helm-config) - -;(org-babel-load-languages -; '((ipython . t))) - -(defalias 'list-buffers 'ibuffer-other-window) - + (package-refresh-contents) + (package-install 'use-package)) -(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. - '(column-number-mode t) - '(display-battery-mode t) - '(electric-indent-mode nil) - '(elpy-rpc-python-command "python3") - '(haskell-hoogle-url "https://www.fpcomplete.com/hoogle?q=%s") - '(haskell-stylish-on-save t) - '(haskell-tags-on-save t) - '(indent-tabs-mode nil) - '(org-agenda-files (quote ("~/foo/orgmode/main.org"))) - '(proof-autosend-enable t) - '(proof-electric-terminator-enable t) - '(proof-shell-quiet-errors nil) - '(python-check-command "flake8") - '(word-wrap t)) -(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. - ) +(org-babel-load-file (expand-file-name "~/.emacs.d/myinit.org")) diff --git a/emacs/init.el b/emacs/init.el @@ -0,0 +1,57 @@ +(require 'package) +(setq package-enable-at-startup nil) +(add-to-list 'package-archives + '("melpa" . "https://melpa.org/packages/")) +(package-initialize) + +;; Bootstrap `use-package' +(unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) + +(evil-mode 1) + + +(global-set-key (kbd "M-x") 'helm-M-x) + + +(elpy-enable) +(elpy-use-ipython) + + +(setq org-confirm-babel-evaluate nil) ;don't prompt me to confirm + ;everytime I want to evaluate + ;a block + +;;; display/update images in the buffer after I evaluate +(add-hook 'org-babel-after-execute-hook + 'org-display-inline-images 'append) + +(org-babel-load-file (expand-file-name "~/.emacs.d/myinit.org")) + +(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. + '(column-number-mode t) + '(display-battery-mode t) + '(electric-indent-mode nil) + '(elpy-rpc-python-command "python3") + '(erc-log-mode t) + '(erc-log-write-after-insert t) + '(erc-log-write-after-send t) + '(haskell-hoogle-url "https://www.fpcomplete.com/hoogle?q=%s") + '(haskell-stylish-on-save t) + '(haskell-tags-on-save t) + '(indent-tabs-mode nil) + '(proof-autosend-enable t) + '(proof-electric-terminator-enable t) + '(proof-shell-quiet-errors nil) + '(python-check-command "flake8")) +(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. + ) diff --git a/emacs/myinit.org b/emacs/myinit.org @@ -0,0 +1,240 @@ +#+STARTUP: overview + +* User Interface tweaks + + - [ ] What is revert-buffer? + + #+BEGIN_SRC emacs-lisp + (setq inhibit-startup-message t) + (setq column-number-mode t) + (setq electric-indent-mode nil) + (setq indent-tabs-mode nil) + (setq display-battery-mode t) + (setq word-wrap t) + #+END_SRC + +** Customize keys + + #+BEGIN_SRC emacs-lisp + (global-set-key (kbd "<f5>") 'revert-buffer) + #+END_SRC + +** Customize buffer list + + #+BEGIN_SRC emacs-lisp + (defalias 'list-buffers 'ibuffer-other-window) + #+END_SRC + +* Ido-mode + + #+BEGIN_SRC emacs-lisp + (setq ido-enable-flex-matching t) + (setq ido-everywhere t) + + (ido-mode 1) + #+END_SRC + +* winner-mode + + #+BEGIN_SRC emacs-lisp + (winner-mode 1) + (windmove-default-keybindings) + #+END_SRC + +* winner-mode + +#+BEGIN_SRC emacs-lisp +(use-package swiper + :ensure t + :config + (progn + (ivy-mode 1) + (setq ivy-use-virtual-buffers t) + (global-set-key "\C-s" 'swiper) + (global-set-key (kbd "C-c C-r") 'ivy-resume) + (global-set-key (kbd "<f6>") 'ivy-resume) + (global-set-key (kbd "M-x") 'counsel-M-x) + (global-set-key (kbd "C-x C-f") 'counsel-find-file) + (global-set-key (kbd "<f1> f") 'counsel-describe-function) + (global-set-key (kbd "<f1> v") 'counsel-describe-variable) + (global-set-key (kbd "<f1> l") 'counsel-find-library) + (global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol) + (global-set-key (kbd "<f2> u") 'counsel-unicode-char) + (global-set-key (kbd "C-c g") 'counsel-git) + (global-set-key (kbd "C-c j") 'counsel-git-grep) + (global-set-key (kbd "C-c k") 'counsel-ag) + (global-set-key (kbd "C-x l") 'counsel-locate) + (global-set-key (kbd "C-S-o") 'counsel-rhythmbox) + (define-key read-expression-map (kbd "C-r") 'counsel-expression-history))) +#+END_SRC + +* ace-window-mode + +#+BEGIN_SRC emacs-lisp +(use-package ace-window + :ensure t + :init + (progn + (global-set-key [remap other-window] 'ace-window) + (custom-set-faces + '(aw-leading-char-face + ((t (:inherit ace-jump-face-foreground :height 3.0))))))) +#+END_SRC + +* tabber-mode + +#+BEGIN_SRC emacs-lisp +(use-package tabbar + :ensure t + :config + (tabbar-mode 1)) +#+END_SRC + +* Evil-mode + + Turn Emacs into a VIM clone. + + #+BEGIN_SRC emacs-lisp + (use-package evil + :ensure t) + :config (evil-mode 1) + #+END_SRC + +* try-mode + + Try packages by temporarily installing them. + + #+BEGIN_SRC emacs-lisp + (use-package try + :ensure t) + #+END_SRC + +* which key + + Brings up some help in the middle of a key sequence. + + #+BEGIN_SRC emacs-lisp + (use-package which-key + :ensure t + :config (which-key-mode)) + #+END_SRC + +* Helm-mode + + #+BEGIN_SRC emacs-lisp + (use-package helm + :ensure t + :config (global-set-key (kbd "M-x") 'helm-M-x)) + #+END_SRC + +* Org-mode + +Org bullets makes things look pretty. + + #+BEGIN_SRC emacs-lisp + (use-package org-bullets + :ensure t + :config + (add-hook 'org-mode-hook + (lambda () (org-bullets-mode 1)))) + #+END_SRC + +** Customize + + What is: + + - [ ] org-export-html-postamble + - [ ] org-hide-leading-stars + - [ ] org-startup-folded and (quote overview) + - [ ] org-startup-indented + + #+BEGIN_SRC emacs-lisp + (setq org-confirm-babel-evaluate nil) + ; Don't prompt me to confirm every time I want to evaluate a block. + (setq org-directory "~/foo/orgmode") + (setq org-default-notes-file + (concat org-directory "/notes.org")) + (setq org-export-html-postamble nil) + (setq org-hide-leading-stars t) + (setq org-startup-folded (quote overview)) + (setq org-startup-indented t)) + + (add-hook 'org-babel-after-execute-hook + 'org-display-inline-images 'append) + + (org-babel-load-languages + '((ipython . t)) + '((emacs-lisp . t))) + #+END_SRC + +* Programming modes + +** Python + +*** elpy + + #+BEGIN_SRC emacs-lisp + (use-package elpy + :ensure t + :config + (elpy-enable) + (elpy-use-ipython) + (elpy-rpc-python-command "python3")) + #+SRC_END + +*** ob-ipython + + org-babel for Jupyter. + + #+BEGIN_SRC emacs-lisp + (use-package ob-ipython + :ensure t + :config + (add-hook 'org-babel-after-execute-hook + 'org-display-inline-images 'append) + ; display/update images in the buffer after I evaluate. + ) + #+SRC_END + +*** Customize + + #+BEGIN_SRC emacs-lisp + (setq python-check-command "flake8") + #+END_SRC + +** Haskell + +*** Customize + + #+BEGIN_SRC emacs-lisp + (setq haskell-hoogle-url "https://www.fpcomplete.com/hoogle?q=%s") + (setq haskell-stylish-on-save t) + (setq haskell-tags-on-save t) + #+END_SRC + +** Coq (hehehe… it says "coq"…) + + #+BEGIN_SRC emacs-lisp + (use-package proofgeneral + :ensure t + :config + (setq proof-autosend-enable t) + (setq proof-electric-terminator-enable t) + (setq proof-shell-quiet-errors nil)) + #+END_SRC + +*** Customize + +* Communication + +** IRC + +*** ERC + +**** Customize + + #+BEGIN_SRC emacs-lisp + (setq log-mode t) + (setq erc-log-write-after-insert t) + (setq erc-log-write-after-send t) + #+END_SRC