Use a less obtrusive default highlighting.
vim/doc/mercury.txt:
Conform to the changes in the *.vim files and fix minor errors.
vim/ftplugin/mercury.vim:
Make variable underlining optional (uses highlight_extra-flag).
Make all variables setlocal and key-mappings silent and buffer-local.
Introduce ,[pftiPMT] and <C-X>[iI] keymappings for rapid typing.
vim/syntax/mercury.vim:
Folding, special comment constructs, concealing operators, foreign
types are all disabled by default.
Increasing synmaxcol from 100 to 250.
Make ::, :, ^, | delimiters and improve colouring of atomic,
or_else, trace and require_* keywords.
Cleanup excessive C(Like)Types.
Clause head expression now correctly recognise zero-arity functions.
All special comment highlighting is strictly optional now.
This patch is a major rewrite of the Vim syntax file
(vim/syntax/mercury.vim), supporting following (optional) features:
- highlighting of foreign code, including all doubly escaped characters
such as "" or \\" in strings, etc.
- recognising \uXXXX \OOO\ and formatting specifiers in Mercury strings
- concealing of certain operators and infix functions such as /\,
the `compose` function from std_util,
and set-calculus related operators (`union`, ...)
- supporting markup within comments, i.e. as function headers, ` ',
``'', URIs and Mercury file names, TODO, NOTE, XXX and so on.
- support underlining of local variables within function or predicate
bodies, which is a feature found in SWI-Prolog.
Additionally one can use <C-K>r and <C-K>R to rename the underlined
variable.
- improved speed due to better overlong line detection and a sync on
Mercury line comments '%-----' instead of sync start, which is
noticeable for large files such as io.m.
- Different way of supporting transparent comment highlighting, such
that spell checking works only on comments in both fully highlighted
and partially highlighted comments, this works best if comment
markup is enables (see above).
Without this, spell checking would have to be enabled for Mercury
code as well which Vim is not good at.
- Improved folding support if no user defined setting is in place
- Matching parenthesis detection (here meaning (),[],{}) and marking
unbalanced parens as err
- highlighting of spurious whitespace for better patch management.
vim/.gitignore:
Ignore mercury.vba file.
vim/Makefile:
A makefile to create a Vimball (.vba) and install that.
vim/README:
Moved installation instructions to vim/doc/mercury.txt and point to
that file.
vim/doc/mercury.txt:
Moved the documentation part from mercury.vim to a Vim documentation
file.
vim/ftplugin/mercury.vim:
Adds highlighting and renaming of currently selected variables,
and enables ftplugin/mercuryhdr.sh on Windows.
vim/ftplugin/mercuryhdr.sh:
Adhere to Mercury coding standards.
vim/syntax/mercury.vim:
see above.
Etimated hours taken: 8
Branches: main
Files and instructions for adding Mercury syntax highlighting under Vim 6.0.
NEWS:
Mention the new directory.
vim:
vim/after:
vim/after/filetype.vim:
vim/ftplugin:
vim/ftplugin/mercury.vim:
vim/ftplugin/mercuryhdr.vim:
vim/syntax:
vim/syntax/mercury.vim:
vim/README:
New directory structure added and populated.
bindist/Mmakefile:
Added VIM_FILES variable and commands to create
$(MERCURY_VERSION)/vim if necessary and populate it.