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

**URL:** <https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [August 25, 2015, 9:37am UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296 "2015-08-25T09:37:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![prtyshrmn1](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@prtyshrmn1](https://forum.kx.com/u/prtyshrmn1)\
**Post date:** [August 25, 2015, 9:37am UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/1 "2015-08-25T09:37:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![LamHinYan](https://avatars.discourse-cdn.com/v4/letter/l/35a633/32.png) [@LamHinYan](https://forum.kx.com/u/LamHinYan)\
**Post date:** [August 25, 2015, 10:00am UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/2 "2015-08-25T10:00:00Z")

</div>

[https://code.kx.com/trac/browser/contrib/ashih/emacs](https://code.kx.com/trac/browser/contrib/ashih/emacs)

[https://code.kx.com/trac/browser/contrib/weaves/tools/emacs](https://code.kx.com/trac/browser/contrib/weaves/tools/emacs)

[https://groups.google.com/d/msg/personal-kdbplus/ry33tnkqCjs/cOfgu6SUnp4J](https://groups.google.com/d/msg/personal-kdbplus/ry33tnkqCjs/cOfgu6SUnp4J)

[http://www.qinsightpad.com/](http://www.qinsightpad.com/)

---

<div class="post-metadata">

**Author:** ![Nick10](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@Nick10](https://forum.kx.com/u/Nick10)\
**Post date:** [August 25, 2015, 11:25am UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/3 "2015-08-25T11:25:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![LamHinYan](https://avatars.discourse-cdn.com/v4/letter/l/35a633/32.png) [@LamHinYan](https://forum.kx.com/u/LamHinYan)\
**Post date:** [August 25, 2015, 12:57pm UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/4 "2015-08-25T12:57:00Z")

</div>

[http://www.timestored.com/kdb-guides/developer-environment#notepad](http://www.timestored.com/kdb-guides/developer-environment#notepad)

---

<div class="post-metadata">

**Author:** ![quintanar4011](https://avatars.discourse-cdn.com/v4/letter/q/6f9a4e/32.png) [@quintanar4011](https://forum.kx.com/u/quintanar4011)\
**Post date:** [August 25, 2015, 1:16pm UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/5 "2015-08-25T13:16:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![prtyshrmn1](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@prtyshrmn1](https://forum.kx.com/u/prtyshrmn1)\
**Post date:** [August 25, 2015, 2:58pm UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/6 "2015-08-25T14:58:00Z")

</div>

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

Thanks vm

Pratyush

---

<div class="post-metadata">

**Author:** ![prtyshrmn1](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@prtyshrmn1](https://forum.kx.com/u/prtyshrmn1)\
**Post date:** [August 25, 2015, 2:59pm UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/7 "2015-08-25T14:59:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![prtyshrmn1](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@prtyshrmn1](https://forum.kx.com/u/prtyshrmn1)\
**Post date:** [August 25, 2015, 3:00pm UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/8 "2015-08-25T15:00:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![prtyshrmn1](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@prtyshrmn1](https://forum.kx.com/u/prtyshrmn1)\
**Post date:** [August 25, 2015, 3:06pm UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/9 "2015-08-25T15:06:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nick10](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@Nick10](https://forum.kx.com/u/Nick10)\
**Post date:** [August 25, 2015, 3:22pm UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/10 "2015-08-25T15:22:00Z")

</div>

i can’t claim to know what Simon’s vim mode does.&nbsp; 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.&nbsp; (very similar to the way ESS-mode allows you to interact with an R/S process)

---

<div class="post-metadata">

**Author:** ![LamHinYan](https://avatars.discourse-cdn.com/v4/letter/l/35a633/32.png) [@LamHinYan](https://forum.kx.com/u/LamHinYan)\
**Post date:** [August 25, 2015, 3:44pm UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/11 "2015-08-25T15:44:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![simon11](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@simon11](https://forum.kx.com/u/simon11)\
**Post date:** [August 25, 2015, 3:59pm UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/12 "2015-08-25T15:59:00Z")

</div>

my vim stuff only does syntax colouring:&nbsp;

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

---

<div class="post-metadata">

**Author:** ![refi64](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@refi64](https://forum.kx.com/u/refi64)\
**Post date:** [August 25, 2015, 4:59pm UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/13 "2015-08-25T16:59:00Z")

</div>

I use&nbsp;Howl&nbsp;+&nbsp;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.)

---

<div class="post-metadata">

**Author:** ![Nick10](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@Nick10](https://forum.kx.com/u/Nick10)\
**Post date:** [August 26, 2015, 12:04am UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/14 "2015-08-26T00:04:00Z")

</div>

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.&nbsp;

---

<div class="post-metadata">

**Author:** ![kuentang](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kuentang](https://forum.kx.com/u/kuentang)\
**Post date:** [August 26, 2015, 1:00am UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/15 "2015-08-26T01:00:00Z")

</div>

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) [[mailto: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

---

<div class="post-metadata">

**Author:** ![prtyshrmn1](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@prtyshrmn1](https://forum.kx.com/u/prtyshrmn1)\
**Post date:** [August 26, 2015, 12:18pm UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/16 "2015-08-26T12:18:00Z")

</div>

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

but &nbsp; “func,: `abc” doesnt format

---

<div class="post-metadata">

**Author:** ![yogeshg91](https://avatars.discourse-cdn.com/v4/letter/y/919ad9/32.png) [@yogeshg91](https://forum.kx.com/u/yogeshg91)\
**Post date:** [August 27, 2015, 2:20am UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/17 "2015-08-27T02:20:00Z")

</div>

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**

---

<div class="post-metadata">

**Author:** ![kuentang](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kuentang](https://forum.kx.com/u/kuentang)\
**Post date:** [August 27, 2015, 7:56am UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/18 "2015-08-27T07:56:00Z")

</div>

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) [[mailto: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 &nbsp; “func,: `abc” doesnt format

---

<div class="post-metadata">

**Author:** ![prtyshrmn1](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@prtyshrmn1](https://forum.kx.com/u/prtyshrmn1)\
**Post date:** [August 27, 2015, 8:41am UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/19 "2015-08-27T08:41:00Z")

</div>

Hey Kim,  
I still see the same issue.

Not sure if I am doing something wrong…

-Pratyush

---

<div class="post-metadata">

**Author:** ![prtyshrmn1](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@prtyshrmn1](https://forum.kx.com/u/prtyshrmn1)\
**Post date:** [September 22, 2015, 10:46am UTC](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296/20 "2015-09-22T10:46:00Z")

</div>

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.

[Next page](https://forum.kx.com/t/what-editors-are-best-used-for-q-coding-and-how-to-get-the-syntax/10296.md?page=2)
