Skip to content

komsit37/sublime-q-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use Sublime Text 2 as q IDE

DEPRECATED: A new version which works with sublime text 3 is available here. I won't be updating this version anymore. Use the new version unless you really need sublime text 2.

Cmd + Enter or Cmd + e to send highlighted text or block text.
Cmd + Alt + s to quickly switch between connections (configured in Preferences->Package Settings->sublime-q) Cmd + Alt + c to edit selected kdb connection
Syntax higlighing (based on kimtang's https://github.com/kimtang/sublime-q)
shows rows, column, time at status bar

    super convenient shortcut (I got this idea from Tinn-R)
  • f1 open help (this is actually on a different plugin, I will need to migrate it here)
  • f2 print variable
  • f3 show type
  • f4 show environments (variable, function, etc)
  • shift + f4 show memory usage (.Q.w)
![Image of screenshot](https://github.com/komsit37/sublime-q-2/blob/master/screenshot.png)

Use Exxeleron's python q api http://www.devnet.de/exxeleron/qpython
Only works with Sublime 2.

Installation

Clone this git repository into your Sublime Text 2/Packages or Sublime Text 3/Packages directory.

  • Windows: %APPDATA%\Sublime Text 2\Packages
  • OS X: ~/Library/Application Support/Sublime Text 2/Packages
  • Linux: ~/.config/sublime-text-2
git clone https://github.com/komsit37/sublime-q.git

Then you will need to download and install numpy 1.8 for python2.6. OSX yosemite comes with default numpy 1.6 for python 2.6

*You need Python 2.6 since this is what sublime text uses Installing the correct version of numpy in osx is a pain since it came with numpy 1.6. I removed numpy 1.6 first (by going to your python2.6 package folder and remove the folder directly). I downloaded .tar.gz from http://sourceforge.net/projects/numpy/files/NumPy/1.8.1/ and then run (if i remembered correctly)

python2.6 setup.py install

Only tested on OSX

Troubleshoot

to check your numpy version and installed directory, open console from sublime text cmd + ` (sublimetext may use different versions from your osx terminal)

import numpy
numpy.version
'1.6.2'
numpy.file
'/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy/init.pyc'

to remove numpy 1.6.2
open terminal
cd /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/
sudo mv numpy numpy_old

Update: Since OSX El Captain, you can't remove default python package with root. You will need to reboot into recovery mode (Command-R at startup logo), and run csrutil disable in terminal. see below link for more details https://apple.stackexchange.com/questions/193368/what-is-the-rootless-feature-in-el-capitan-really

About

sublime text plugin for q/kdb

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published