-
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
send word at cursor to REPL #35
Comments
You could use These are the three things you are looking for: (require 'eval-in-repl-python)
(eir-python-shell-send-string (thing-at-point 'symbol))
(eir-python-shell-send-string (format "%s.info()" (thing-at-point 'symbol)))
(eir-python-shell-send-string (format "type(%s)" (thing-at-point 'symbol))) |
@terlar Thank you!!! Last question: How can I replicate the functionality of elpy's send-current-line-or-statement? eval-in-repl can send a line, but when I call it from within a loop it gives and indent error. (the line is indented) Is there a way to realise this behaviour? |
You could do something like this, it will strip all leading space from the line if that is what you are looking for. The current line eval is made to be line by line, and therefore saves the indentation. (eir-python-shell-send-string
(replace-regexp-in-string
"\\`[ \t\n]*"
""
(buffer-substring-no-properties (line-beginning-position) (line-end-position)))) |
I want to improve my Python workflow in the following way:
I do the following with Elpy but since I use spacemacs I'd rather not use it since it is big.
Can someone please help me with the points above using spacemacs + eir?
The text was updated successfully, but these errors were encountered: