Proof-general is a powerful client for the Coq proof assistant, and Software
Foundations is great interactive tutorial for the language. As I was following
the tutorial, I felt the need to speed things up a little bit. Today’s post is
just some configuration code I wrote for that effect.
Parts of it might be useful for coq in general, but its mostly optimized to
minimize keystrokes in the tutorial, and sometimes it leaves bad indentation or
extra lines all over the place.
;; I appreciate the effort of writing a splash-screen, but the angry;; general on the gif scares me.(setqproof-splash-seent);;; Hybrid mode is by far the best.(setqproof-three-window-mode-policy'hybrid);;; I don't know who wants to evaluate comments;;; one-by-one, but I don't.(setqproof-script-fly-past-commentst)(with-eval-after-load'coq;; The most common command by far. Having a 3(!);; keys long sequence for this command is just a;; crime.(define-keycoq-mode-map"\M-n"#'proof-assert-next-command-interactive);; Proof navigation didn't work for me. So please;; stand aside for my paragraph navigation.;; https://endlessparentheses.com/meta-binds-part-2-a-peeve-with-paragraphs.html(define-keycoq-mode-map"\M-e"nil)(define-keycoq-mode-map"\M-a"nil);; Small convenience for commonly written commands.(define-keycoq-mode-map"\C-c\C-m""\nend\t")(define-keycoq-mode-map"\C-c\C-e"#'endless/qed)(defunendless/qed()(interactive)(unless(memq(char-before)'(?\s?\n?\r))(insert" "))(insert"Qed.")(proof-assert-next-command-interactive)))(defunopen-after-coq-command()(when(looking-at-p" *(\\*")(open-line1)))(advice-add'proof-assert-next-command-interactive:after#'open-after-coq-command)
These are some common abbrevs, and an advice so you don’t have to hit SPC
before M-n.
Proof general configuration for the Coq Software Foundations tutorial
18 May 2015, by Artur Malabarba.Proof-general is a powerful client for the Coq proof assistant, and Software Foundations is great interactive tutorial for the language. As I was following the tutorial, I felt the need to speed things up a little bit. Today’s post is just some configuration code I wrote for that effect.
Parts of it might be useful for coq in general, but its mostly optimized to minimize keystrokes in the tutorial, and sometimes it leaves bad indentation or extra lines all over the place.
These are some common abbrevs, and an advice so you don’t have to hit SPC before M-n.
And finally, the most important snippet. Just make sure you install
company-coq
from Melpa.Tags: programming, init.el, emacs,
New in Emacs 25.1: Better dependency management »
« Ispell and Apostrophes
Related Posts
Turbo up your Ruby console in Emacs in programming
A few paredit keys that take over the world in programming
Restarting the compilation buffer in comint-mode in programming
Content © 2019, All rights reserved. Icons under CC3.0.