Syntax highlighting and Coq interactivity for Sublime Text 3
Python JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Default (OSX).sublime-keymap


This package provides Coq syntax highlighting and an interactive coqtop plugin for Coq 8.4 and Sublime Text 3. (I guess it might work with Sublime Text 2, but I haven't tested it and I don't recommend trying it.)


There is a different sublime-coq plugin in Package Control. That is NOT this one. This one is better. Even if it does have some problems (see "Known Issues" below).

cd 'sublime-text-folder/Packages'
git clone 'this-repo'

You can find the sublime-text-folder/Packages folder from Sublime Text by going to Preferences -> Browse Packages.


ctrl+enter: evaluate to (or rewind to) the current cursor
shift+ctrl+k: kill coqtop


By default, the "TODO" section is colored by scope "meta.coq.todo" and the "DONE" section is colored by scope "meta.coq.proven". To actually see these regions, modify your color scheme file like so:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
    <string>(name for your color scheme)</string>

        <!-- ########## BEGIN ADDITIONS -->

            <string>Coq TODO</string>

            <string>Coq high-water mark</string>

        <!-- ########## END ADDITIONS -->

(Of course, you may want to change the style settings to match your color scheme and taste.)

Modifying your color scheme isn't terribly easy; I'm just going to point you at this StackOverflow question and let you figure out the rest.

Known Issues / TODO

  • There is zero support for Coq 8.5
  • There aren't really any settings available, so you might need to modify on your own
  • The highlighting for the proven region is really ugly. (I want some way of highlighting that colors the background without removing other syntax highlighting, but that doesn't seem possible in Sublime.)
  • Typing in the proven or TODO region can confuse the plugin
  • Comments immediately preceeding bullets (e.g. (* hello world *) - auto.) cause problems
  • Custom notations using the . symbol cause problems
  • Keyboard bindings only exist for OSX
  • High-water mark sometimes gets out of sync with reality (especially during undo)
  • Feedback from Check and Print commands isn't shown in the response window