Skip to content

Conversation

@laconiccrafts
Copy link

SublimeREPL has updated their namespaces for python 3.

@laconiccrafts
Copy link
Author

laconiccrafts commented Aug 12, 2019

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

@laconiccrafts
Copy link
Author

laconiccrafts 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