Last active
April 2, 2020 23:53
-
-
Save pedrominicz/221105ed542cace699b06af1b1a6b30b to your computer and use it in GitHub Desktop.
Minimal Emacs configuration.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Minimal Emacs configuration by a Vi user who is only using this because of | |
;; Agda. Because colors suck and terminals rule, you should add the following | |
;; to your shell's runtime configuration: | |
;; | |
;; alias evil='emacs --no-window-system --color=never' | |
;; | |
;; Set up `package.el` to work with MELPA. | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "https://stable.melpa.org/packages/")) | |
(package-initialize) | |
;; Install Evil. | |
(unless (package-installed-p 'evil) | |
(package-refresh-contents) | |
(package-install 'evil)) | |
;; Enable Evil, that is, make Emacs usable. | |
(require 'evil) | |
(evil-mode 1) | |
;; Make `<c-h>` behave like `<bs>`. | |
(global-set-key (kbd "C-h") 'delete-backward-char) | |
(global-set-key (kbd "C-?") 'help-command) | |
;; Make `<c-j>` behave like `<cr>` in Ex mode. | |
(define-key evil-ex-completion-map (kbd "C-j") 'exit-minibuffer) | |
;; Enable Agda mode, that is, make Emacs useful. | |
(load-file | |
(let | |
((coding-system-for-read 'utf-8)) | |
(shell-command-to-string "agda-mode locate"))) | |
;(add-hook 'evil-insert-state-entry-hook | |
; (lambda () (when (eq 'agda2-mode (buffer-local-value 'major-mode (current-buffer))) | |
; (set-input-method "Agda")))) | |
;(add-hook 'evil-insert-state-exit-hook (lambda () (set-input-method nil))) | |
; | |
;(evil-define-key nil evil-insert-state-map | |
; (kbd "C-c C-l") 'agda2-load | |
; (kbd "C-c C-r") 'agda2-refine | |
; (kbd "C-c C-a") 'agda2-auto-maybe-all | |
; (kbd "C-c C-c") 'agda2-make-case | |
; (kbd "C-c C-n") 'agda2-compute-normalised-maybe-toplevel) | |
(custom-set-variables | |
'(agda-input-tweak-all | |
'(agda-input-compose | |
(agda-input-prepend ";") | |
(agda-input-nonempty)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment