Extended SMT-LIB2 support for VIM
What is this?
A VIM plugin that adds syntax highlighting for the SMT-LIB2 format, i.e.
Although SMT-LIB2 is the standard language supported by most SMT solvers, some of them introduce custom language extensions. Such extensions may range from syntactical sugar to fine-grained control over the underlying solver-procedure. Besides the base SMT-LIB2 language, this plugin supports the extensions used by the Z3 SMT solver.
Note: Unlike other SMT-LIB2 syntax highlighters for VIM, this one is derived directly from the source of Z3's online demo.
<localleader>revaluates the current file (in a terminal)
<localleader>Revaluates the current file and puts the output in a new split with syntax highlighting
<localleader>vprints the solver's version (handy if you switch often)
Note: Unless you've set
<localleader> to a custom key, it is
\ (VIM default).
|manual (discouraged)||Extract the archive or clone the repository into a directory in your
If you only care about the syntax highlighting and don't need shortcuts for calling a solver, you're done.
Otherwise, you need to:
~/.vimrcto the command for calling the solver of your choice (e.g.
let g:smt2_solver_command="boolector -m") and also
g:smt2_solver_version_switchto the solver's command line switch for printing it's version (default:
Why does VIM not show any syntax highlighting - neither for
*.smt2files nor for others?
Most likely syntax highlighting is simply disabled.
You can enable syntax highlighting by typing
:syntax on in VIM or adding
syntax on to your
Why does the ending of a file, e.g.
*.smt2, not affect the plugins loaded by VIM?
Make sure that you have filetype plugins enabled. See |filetype-plugin-on| for details, or simply add the following to your
filetype plugin on
What do you use to get the look shown on the screenshot?
You can always create an issue if you find bugs or think that something could be improved. If you want to tackle an issue or contribute to the plugin feel free to create a pull request.