Re:Using Vim as a Python IDE
by wry_discontent on Tuesday January 31, 2017 @11:02PM
(#13538128)
Emacs comes configured with a command called "send-region-to-shell" that will take the current region and send it to a python interpreter. It makes for a great development experience that I haven't seen replicated with other tools and I'm not sure why there's not a bigger interest in it.
[ Parent
| on HN ]
If I'm not mistaken, that's one of the features of Tslime[1], which is a Vim plugin that allows Vim to communicate with Tmux.
Yup! There are in fact quite a few similar vim plug-ins that do the same.
This is one of the longest-standing line in my vimrc so far:
Plug 'epeli/slimux'
Works best for what I do.I built a small plugin to do that, it's called vim cell mode and provide "send selection to ipython" and "send block to ipython". I find the block mode very useful when developing data analysis scripts.
Also, comes with org-babel that can do similar stuff with literate programming.. Also not sure how people live without it.
Re:Using Vim as a Python IDE
by andreareina on Wednesday February 01, 2017 @04:11AM
(#13539431)
One of the features that elevates org-babel is being able to work on the same data in multiple tools. It's not uncommon for me to start with data in a table, transform it with a bit of python or lisp, and feed the result into gnuplot.
If you could point to one simple example of this it works be awesome! I've used org-babel but in a very fragmented way. My sessions were separated from each other and I did not use multiple languages on the same data
Re:Using Vim as a Python IDE
by andreareina on Wednesday February 01, 2017 @08:58PM
(#13547425)
The files are gone, but you do it by referring to the table/block names.
#+name: data-table
....
#+name: process-data
#+begin_src lisp :var data=data-table
...
#+end_src
#+begin_src gnuplot :var data=process-data
...
#+end_srcI did this with a tslime plugin from vim for several years. I used it extensively for javascript, sql, python, and clojure. After awhile, I stopped fighting and switched to spacemacs so I wouldn't have to both do my dayjob and maintain an IDE.
I have a nice 'generic-eval' operator in evil that lets me select via motions and eval the result. This is the best experience I've found so far. Documented here: https://gist.github.com/ad2b435bfdf2ec5f0b4d57aa8ea40df6
> Emacs comes configured with a command called "send-region-to-shell"
The superior solution you are looking for is the package called elpy.
It provides this, linting via flycheck, contextual auto-completion via company-mode, etc etc.
I wouldn't know how to survive without it. It's almost a full IDE in itself.
Atom has a nice package with that feature.
https://atom.io/packages/Hydrogen
That looks very doable in acme[0].