Live data from Hacker News

Using Vim as a Python IDE

liuchengxu.org

21–30 of 158 posts

Re: Using Vim as a Python IDE

#21

Nice post. I also really like you "space-vim" project. Another similarly named project — "SpaceVim" http://spacevim.org/ — was posted recently. "SpaceVim" was really upsetting because it missed so many of the important ideas of Spacemacs, such as pneumonic keybindings. "SpaceVim" is a garden variety vim distribution coopting the "Spacemacs" name, but you stayed true to the "Spacemacs" principles. Nice work!

I'm glad you like it. That's because I'm both a vimmer and a spacemacs user -_-.

Re: Using Vim as a Python IDE

#22

Nice post. I also really like you "space-vim" project. Another similarly named project — "SpaceVim" http://spacevim.org/ — was posted recently. "SpaceVim" was really upsetting because it missed so many of the important ideas of Spacemacs, such as pneumonic keybindings. "SpaceVim" is a garden variety vim distribution coopting the "Spacemacs" name, but you stayed true to the "Spacemacs" principles. Nice work!

This threw me for a second but its "mnemonic" not "pneumonic".

Re: Using Vim as a Python IDE

#23
post #2

I keep seeing tmux mentioned recently. Can someone eli5 what it does and why it's useful?

tmux is like structured LSD, opening terminals to the Universe in unlimited instances and recursions of Sessions and Windows and Panes, and Windows and Panes, Panes, Panes ... Panes ... Multiple realities of Sessions can be started, persisted, detached, reattached, and can exist on your local laptop, another machine on your LAN, or school or corporate network, or the Space Station or Mars, all spanned by your one mind and The One Mind.

Man. https://linux.die.net/man/1/tmux

Or if you're not into the whole brevity thing: https://linux.die.net/man/1/tmux

Try it with a friend the first time.

Re: Using Vim as a Python IDE

#24
post #10
post #6

Earlier quoted context omitted.

tmux is a terminal multiplexer - if you have ever used the `screen` command you already know what it is. I use a macbook pro with iterm2, and I prefer to use a terminal multiplexer instead of tabs or the native screen split of iterm2. If you ssh remote boxes a lot, it is very useful because you will not lose your session in case of an occasional disconnection.

Iterm2 also has a nice tmux integration. You can connect to a session but use native tabs and panes. It even works on remote servers over ssh. You just add a '-CC' arg. (You may also have to enable it in the prefs, don't remember for sure)

I've never been able to get iTerm2's tmux integration to work well enough to warrant the bother.

Re: Using Vim as a Python IDE

#25
post #3

I would love to download a config file with a curated list of plugins that turns vim into a good Python IDE.

Let me augment that with this: I would love to donate to a project that uses ${INSERT_TERMINAL_TEXT_EDITOR} and turns it into a general IDE. I'm talking the full shebang. * Autocomplete/Autoimporting (Static Analysis backed by compiler output) * Formatting * Linting * Fast or able to run over a slow SSH connection. * Default error resolutions (if test() throws an exception generate a try { }) * Global refactoring * T…

I heard good things about http://vim.spf13.com/

Re: Using Vim as a Python IDE

#26

Yesterday I've downloaded VSCode and https://github.com/DonJayamanne/pythonVSCode (seriously, look at the GIFs in this repo!) for first time and I had autocompletion (with IntelliSense and documentation lookup), refactoring and code define jumping for Python code out of the box working within 10 minutes in a VirtualEnv. VSCode + one plugin (all opensource) and I had something similar to PyCharm and fast. (nothing aga…

god help me escape pycharm, i only got 4gb of ram

Re: Using Vim as a Python IDE

#27

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.

That looks very doable in acme[0].

[0]: https://research.swtch.com/acme

Re: Using Vim as a Python IDE

#28
The one thing I'd love to see, as a vim user and a scientist, is something like Matlab/RStudio/Spyder where you can explore variables that exist within a session. Maybe it could hook up to an ipython session and you could display it in a separate terminal and send commands with vim-slime to be updated in real time.

For the most part, when I need this, I revert to Rodeo (since it has vim bindings like RStudio's), but if I could ditch it that would be amazing. Nothing against Rodeo or other editors, but vim habits are hard to break.

Re: Using Vim as a Python IDE

#29

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.

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

#30

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.

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.

[1]: https://github.com/jgdavey/tslime.vim/

Post reply on HN