vimcmdline
vimcmdline copied to clipboard
Add q (kdb) support
I am running a similar functionality that I mostly derived from your notes in vim-r-plugin. With the help of tmux/screen I send selection from my vim buffer to another tmux/screen session. This looks very similar to what your plugin seems to be doing. Is there a possibility for the user to specify any program (would be q for me) and leverage on your plugin ?
Is q
the name of an application? To add support to another command line interpreter, you have to create the corresponding files in ftplugin and syntax directories.
Yes q is the name of an application from https://kx.com/, with a trial here: https://kx.com/software-download.php which is massively used in finance. The problem with it is that the interpreter is very sensible to tabs and spaces. I am wondering how the "multiline" sendline would work. I sent a question that has been answered on SO http://stackoverflow.com/questions/20419485/how-to-concatenate-several-lines-in-vim
You have to add the support yourself because I don't have spare time to install and learn q
. Please copy the files of one of the already supported languages from syntax/ and ftplugin/ directories, rename them appropriately, make the necessary adjustments in their contents, test the result, and send a pull request. Python is very sensible to tabs and spaces too. So, you could use the files supporting Python as a starting point.
Ok, I never suggested you did all this, I was merely showing you what q was. Will try to pull that out.
Hi, I'm trying to finish this, even though I have no 0 knowledge on vim script (I'm reading the vim script tutorial now), is it possible for you to give me the permission to create a branch in this repository ? Thanks a lot.
Yes, if you can make a pull request creating a branch I will merge it.
I merged the pull request, but the file syntax/cmdlineoutput_kbd.vim
is missing, and it is required to get the output colorized in Neovim's terminal.
I am not using neovim,I'll get my hand on a syntax file and send another PR. BTW did you add support to send from multiple buffers I tested vim and thus and it works perfectly.
In the rare occasions that I use vimcmdline, I just edit one script and send the code to one interpreter. I did not intentionally support multiple buffers.
Hey there are many q syntax files available, can I simply copy https://github.com/katusk/vim-qkdb-syntax for instance? Can I also add an indent file?
can I simply copy https://github.com/katusk/vim-qkdb-syntax
No. It's not a q syntax that is missing. Please, install Neovim and take a look at the other syntax files at vimcmdline syntax
directory. The output should be highlighted as output, not as the q language.