-
Notifications
You must be signed in to change notification settings - Fork 27
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
thisProcess.nowExecutingPath #36
Comments
In order to get the proof-of-concept working I had to start a new nvim instance using |
Last time I looked into that, I found that scvim and scel lack proper implementation. Here's some relevant mailing list doc: |
@dvzrv Thanks for the link! Dan's answer worked. After creating |
Hmm, the thing is: scvim is now a submodule. We have to find out, how to do this, so it works out of the box for SuperCollider, when using vim/scvim. |
Also: Awesome! I never had time to look into it again :) |
Yes, for sure. I somehow feel like this approach of putting SCVim.sc in Maybe manually creating |
Based on @davidgranstrom solution, i've made it work for vim, but this require to start vim in server mode. If I understand correctly, there is no start script, so i guess this up to the user to start vim in correct mode and correct server name |
see pull request #48 |
Closed the pull request, as it was, unfortunately- I missed this feature as well. I also didn't know it was working for neovim. I actually thought about this some more, but I just can't justify to myself scvim not behaving identically across platforms in order to support this feature, and also not the code complexity. I still think is very worthwhile to do, but we need something that's easy on the user- the more I think about it, the more I like the idea of executing an additional command in sclang to set the value that loadRelative needs before executing the proper command, but some thought may be required on how to prevent that idea from breaking stuff. Using a global variable with a long name should work, even with environments. |
Something I've missed for a long time in
scvim
is usingthisProcess.nowExecutingPath
in a .scd file to get the current buffer's absolute path.I think the way to achive this is to implement
Document
support for scvim. I have a proof-of-concept here which works for neovim using the neovim-remote tool. It should be easy to adopt for regular vim as well which already include the--remote-expr
flag by default.Implementing Document for scvim comes with some issues though, because you get a "duplicate class" conflict when using the IDE (ScIDE.sc also implements Document). I have looked at ScelDocument, which inherits another implementation of Document (found in editors/scel), so I'm guessing scel-users suffer the same problem with the "duplicate class" error in the IDE. Maybe someone using emacs/scel could confirm this? I'm hoping there is some way to only include SCVim.sc when running sclang with the -i scvim flag, but I haven't found one yet.
Does anyone with more experience with Document have any thoughts on this?
The text was updated successfully, but these errors were encountered: