Convert Notepad ++ syntax highlighting file to vim (or does anyone have q / kdb + vim syntax highlighting file?)

I have a syntax highlighting file for q / kdb + and I would like to convert it to a vim compatible file so that my q code does not look more ugly than usual.

Are there utilities for automatically converting the notepad ++ xml syntax highlighting files in version vi? I looked around, but found nothing.

Also, does anyone have a vim q syntax highlighting file?

+5
source share
2 answers

q / kdb + vim syntax highlight files: https://github.com/simongarland/vim

+7

- ( , q), Notepad ++, XML-, . "Q", - , . :

" Remove all the lines that aren't lists of keywords
" (there doesn't seem to be anything much more complicated
" than that in the definition file)
:g!/<Keywords name=/d
" Convert the lines (fairly poor XML parsing here!)
:%s/\s*<Keywords name="\([^"]\+\)">\([[:alpha:]_ ]\{-}\)<\/Keywords>/syn keyword \1 \2/

, :

syn keyword Words1 case then do while

(Words1 ), , Vim ( , Vim).

, , , :

<Keywords name="Operators">- ! &quot; # $ &amp; * , . ; ? @ \ ^ { | } ~ + &lt; = &gt;</Keywords>

syn match Operators /\<[-!"#$&*,.;?@\\^{|}~+<=>]/

( \<, , [..] ).

:

if exists("b:current_syntax")
    finish
endif

:

let b:current_syntax = "q"

.

, , , , , , . :

:help syntax

.

!

+4

All Articles