Code Monkey home page Code Monkey logo

sublime-coq's Introduction

Sublime Coq

Extensions to the Sublime Text 3 editor for use with the Coq Proof Assistant.

Getting Started

Currently, Sublime-Coq plugin is not as flexible as you might hope, but it is still working well. First, open your coq script in a window, then select Sublime-Coq: Run in the command palette. Now you should see another pane jumping out, showing the welcome message from coqtop.

All your editing operations should be done at the script pane, while all commands should be issued only at the *COQTOP* pane.

There are several commands available now:

  • Next statement (OS X: super+ctrl+n, Win/Linux: ctrl+down): Prove the current line and go to next statement
  • Undo statement (OS X: super+ctrl+u, Win/Linux: ctrl+up): Undo the current proven statement and go back to the last line. NOTE: it seems not working as smoothly as CoqIDE now, but you can try it several times and see how it behaves.
  • Success: (OS X: super+ctrl+s, Win/Linux: ctrl+enter): Mark current line as proven and go to next line. Similar to Next statement but you don't send anything to coqtop
  • Clear: (OS X: super+ctrl+c, Win/Linux: ctrl+backspace): Clear the output information on *COQTOP* pane
  • Stop: (OS X: super+ctrl+k, Win/Linux: ctrl+escape): Stop the coqtop and close the output pane.

coqtop Path

You might need to modify the user preference file for Sublime-Coq, change coqtop_path to a proper value (usually from which coqtop or similar way), so the coqtop program can be correctly found.

The default value will simply be coqtop, but during initialization, $PATH will also be searched.

Highlighting

In order to get nice background highlighting for the proven parts of the file, add this to your theme (for light backgrounds):

<dict>
  <key>name</key>
  <string>Proven by Coq</string>
  <key>scope</key>
  <string>meta.coq.proven</string>
  <key>settings</key>
  <dict>
    <key>background</key>
    <string>#dcffcc</string>
  </dict>
</dict>

TODOs

  • Enrich the language spec
  • The undo seems not working well sometimes

sublime-coq's People

Contributors

mkolosick avatar whitequark avatar izgzhen avatar yvt avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.