What editors are best used for q coding? And how to get the syntax

I have tried vim, emacs and sublime. I find significant quality of life improvement when using highlighting while I code in q.
Emacs does not seem to have an active contribution to syntax highlighting. Vim’s highlights written by Simon Garland seems to be a standard.

Let me know what are you using and what are your preferences?

https://code.kx.com/trac/browser/contrib/ashih/emacs

https://code.kx.com/trac/browser/contrib/weaves/tools/emacs

https://groups.google.com/d/msg/personal-kdbplus/ry33tnkqCjs/cOfgu6SUnp4J

http://www.qinsightpad.com/

if you like emacs, try: https://github.com/psaris/q-mode

http://www.timestored.com/kdb-guides/developer-environment#notepad

I’ve added some plugins for Q for Atom (www.atom.io) editor. It is node/chrome based and thus slower than native editors but you can easily extend it if you need something.

Hey Nick,
Yes huge fan of emacs- does this have all features that Simon has planted in vim?

Thanks vm

Pratyush

I have found atom to be relatively unstable.
I will try this out though!

I have checked these at contrib location. Most of them are written long back/
For one I had lack of version compatibility.

Urge you to link the code in the git page for kx :)

i can’t claim to know what Simon’s vim mode does.  but q-mode does perform syntax highlighting

and in addition, it allows you to communicate with a q/qcon process so you can send single lines, regions, functions or whole buffers.  (very similar to the way ESS-mode allows you to interact with an R/S process)

nick: i have been waiting for your q-mode. can your q-mode automatically add a prefix to every expression submitted to kdb thru ipc? one useful prefix i often use is ‘system “d .rdb”’ to make sure that stuff goes to the .rdb namespace. the ‘system “d .rdb”’ is only effective during the ipc call. so it has to be submitted as a prefix every time.

my vim stuff only does syntax colouring: 

https://github.com/simongarland/vim

if you want more advanced features like communicating with a q session see attila’s version at:

http://code.kx.com/wsvn/code/contrib/avrabecz/vim

I use Howl + howl-k; even though it’s technically for K2, it works well with Q.

(Speaking of which, I’ve been meaning to write a Q bundle based on howl-k, but I haven’t gotten the chance yet.)

good idea yan. i’ll take this offline to discuss the merits of having it configured as a global/file-local variable or a prefix arg to the functions. 

I personally use sublime.<o:p></o:p>

<o:p> </o:p>

Syntax highlighting is here: https://github.com/kimtang/sublime-q/ <o:p></o:p>

<o:p> </o:p>

And there is also a plugin where you can send q commands directly to a q process via kdb+ studio. The idea is to load kdb+ studio into sublimerepl via scala. From there you can execute any q commands from sublime and have the results displayed in kdb+ studio.<o:p></o:p>

<o:p> </o:p>

Unfortunately the plugin depends on sublimerepl and scala and the installation is not trivial. So that’s why it is not available to the community yet. <o:p></o:p>

<o:p> </o:p>

Kim<o:p></o:p>

<o:p> </o:p>

Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von Pratyush Raman
Gesendet: Dienstag, 25. August 2015 16:38
An: Kdb+ Personal Developers
Betreff: [personal kdb+] What editors are best used for q coding? And how to get the syntax highlighting<o:p></o:p>

<o:p> </o:p>

I have tried vim, emacs and sublime. I find significant quality of life improvement when using highlighting while I code in q.<o:p></o:p>

Emacs does not seem to have an active contribution to syntax highlighting. Vim’s highlights written by Simon Garland seems to be a standard.<o:p></o:p>

<o:p> </o:p>

Let me know what are you using and what are your preferences?<o:p></o:p>


Submitted via Google Groups

I want to change the way assignment changes formating.
e.g., "func: `abc " formats func to a symbol

but   “func,: `abc” doesnt format

I also use sublime, it’s much better to view at the very least, I and a friend wrote a simple plugin to send q queries from sublime to q servers over http. It’s not much, but it’s something! We’re yet to write something to send queries over tcp.

Kim, Thanks for your highlighting plugin!

If the above mentioned plugin can be used by a wider community, I’d be happy to re-write it.

Yogesh Garg

Ok, done.<o:p></o:p>

<o:p> </o:p>

Kim<o:p></o:p>

<o:p> </o:p>

Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von Pratyush Raman
Gesendet: Mittwoch, 26. August 2015 19:19
An: Kdb+ Personal Developers
Betreff: Re: [personal kdb+] What editors are best used for q coding? And how to get the syntax highlighting<o:p></o:p>

<o:p> </o:p>

I want to change the way assignment changes formating.<o:p></o:p>

e.g., "func: `abc " formats func to a symbol<o:p></o:p>

but   “func,: `abc” doesnt format

Hey Kim,
I still see the same issue.

Not sure if I am doing something wrong…

-Pratyush

I have settled on vim for now. Simon’s script for syntax is very useful.
I found Sublime equally good, but since most of my work is Unix based, makes more sense to use vim.