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

Update ClojureHelpers.py #6

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

efraimmgon
Copy link

SublimeREPL has updated their namespaces for python 3.

@efraimmgon
Copy link
Author

efraimmgon commented Aug 12, 2019

Can also update the readme, as with these changes it works for Sublime Text 3.

@efraimmgon
Copy link
Author

efraimmgon commented Aug 12, 2019

I also think LoadFileInReplCommand should switch the ns to that of the loaded file, or at least there should be a keybind to do so.

I haven't included it, but it is simple:

class LoadFileInReplCommand(text_transfer.ReplTransferCurrent):
  def run(self, edit):
    form = "(load-file \"" + self.view.file_name() +"\")"
    self.view.window().run_command("run_command_in_repl", {"command": form})

    ## Switch to the namespace of the current file 
    ns = re.sub("ns\s*", "", self.view.substr(self.view.find("ns\s*\S+",0)))
    form2 = "(in-ns '" + ns + ")"
    self.view.window().run_command("run_command_in_repl", {"command": form2})

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

Successfully merging this pull request may close these issues.

1 participant