vim Syntax Highlighting and Indenting Support for k and q/kdb+
Yet another vim syntax highlighting for kdb+, forked from vim-qkdb-syntax by katusk, which is derived from vim by Simon Garland. There is additional inspiration from qvim by patmok.
This repo adds special highlighting for:
- Query keywords,
select,update,upsert,insert,exec,delete,byandfrom. - Most keywords up to kdb+ v4.0 2022.09.30.
This guide assumes your vim configuration files are located within your home directory.
Ensure syntax highlighting is enabled in ~/.vimrc.
syntax on
Copy the \*.vim files from syntax and indent
to their corresponding directories under ~/.vim/, creating them if need be.
If it does not exist then copy filetype.vim to ~/.vim/.
If filetype.vim already exists then just insert the
relevant k & q lines from this repo.
Most of the work is done in k.vim (which is loaded into
q.vim) as q "only" adds the functions in .q as
primitives, and relaxes the restriction on underscores in names.