Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace browser in vim split #14

Open
tdy opened this issue Aug 18, 2016 · 2 comments
Open

Workspace browser in vim split #14

tdy opened this issue Aug 18, 2016 · 2 comments

Comments

@tdy
Copy link
Contributor

tdy commented Aug 18, 2016

It'd be nice to have a workspace summary in a read-only vim split (like a topright new split with buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap nomodifiable).

As for how to keep this vim buffer in sync with MATLAB's workspace, I'm not sure.

1) My first thought was to use whos, which gives a condensed version of the GUI workspace browser (without min/max/range/mean/median/mode/std/var):

>> whos
  Name     Size     Bytes     Class     Attributes
  S        4x1       6230     struct
  ans      5x5        200     double
  p       64x3       1536     double
  x        1x1          8     double

Use MatlabCliController#run_code to store whos output in a new diary after each command.

diary = "/tmp/vim-matlab.whos"
code += ",delete '{diary}',diary '{diary}',whos,diary off".format(diary=diary)

And create PythonVimUtils#get_current_matlab_workspace to update the workspace buffer with the contents of /tmp/vim-matlab.whos (or maybe just open the file itself).

But even if this idea works, it would output whos to the console after each command. As far as I can tell, pexpect's filters wouldn't help in this case.

2) My second thought... I don't have one yet.

@daeyun
Copy link
Owner

daeyun commented Aug 19, 2016

How about using MATLAB's GUI window as-is (workspace command in cli)?

Similarly you can do edit {filename} or (:MatlabCliOpenInEditor in vim) to open the GUI editor for things like setting breakpoints.

screenshot 2016-08-18 20 57 56

@tdy
Copy link
Contributor Author

tdy commented Aug 19, 2016

That's true, but I was just thinking about potential functionalities that could be moved to vim/multiplexers without the JVM.

This is just a lower priority feature request in case someone has the time/interest/idea for implementing it. Actually I don't know how to submit feature requests on github, so I just used Issues. Not sure if that's how it works on here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants