Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 2.48 KB

README.md

File metadata and controls

43 lines (31 loc) · 2.48 KB

BTOR2 support for VIM

What is this?

A VIM plugin that adds syntax highlighting for the BTOR2 word-level model checking format, i.e. *.btor2 files.

The plugin also provides shortcuts for evaluating the current file using boolector:

  • <localleader>e evaluates the current file (in a terminal)
  • <localleader>E evaluates the current file and puts the output in a new split with syntax highlighting
  • <localleader>r replaces all occurrences of the word under the cursor

Note: Unless you've set <localleader> to a custom key, it is \ (VIM default).

Installation

Plugin Manager Instructions
Pathogen
  1. cd ~/.vim/bundle
  2. git clone https://github.com/phlo/vim-btor2
Vundle
  1. add Plugin 'phlo/vim-btor2' to your ~/.vimrc file (before call vundle#end())
  2. reload your ~/.vimrc or restart VIM
  3. run :PluginInstall in VIM
manual (discouraged) Extract the archive or clone the repository into a directory in your runtimepath (e.g. ~/.vim/):
  1. cd ~/.vim/
  2. curl -L https://github.com/phlo/vim-btor2/tarball/master | tar xz --strip 1

Configuration

If you only care about the syntax highlighting and don't need shortcuts for calling boolector, you're done.

Otherwise, you need to:

  • have boolector and btormc in your $PATH, or
  • set g:btor2_boolector_command and/or g:btor2_btormc_command in your ~/.vimrc to the commands for calling boolector and btormc with arguments of your choice (e.g. let g:btor2_boolector_command="boolector -m")

FAQ

Why does VIM not show any syntax highlighting - neither for *.btor2 files 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 ~/.vimrc file.

Why does the ending of a file, e.g. *.btor2, 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 ~/.vimrc:

filetype plugin on

Contribute

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.