Live data from Hacker News

Using Vim as a Python IDE

liuchengxu.org

31–40 of 158 posts

Re: Using Vim as a Python IDE

#31
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)

This is what I usually do to connect to a remote server and enter a tmux session:

  ssh hostname -t "tmux -CC attach || tmux -CC"
Of course, I picked this up from an HN comment :)

Re: Using Vim as a Python IDE

#32

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…

How does this compare to something like sublime + anaconda?

Re: Using Vim as a Python IDE

#33
post #13
post #8

Earlier quoted context omitted.

Most of the other comments mention that you can split your screen into tabs and panes. But by far the most important feature of gnu-screen or tmux is the ability to have a shell session running even when you're not logged in. So you can use tmux to start a shell session and run a script(say a command line IRC client) and leave it running. Next you'll just 'detach' from your tmux session and can logout. Your irc clien…

this x 1000 tl;dr, use tmux if you ssh into places and hate restarting after losing your connection.

I figured out running screen at the beginning of pretty much every ssh session probably freshman year of college, and it kind of shocks me to hear that people don't regularly do that.

Re: Using Vim as a Python IDE

#34
post #2

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

The most useful feature of tmux for me is the ability to switch between different projects effortlessly. Within a session i would have multiple windows, one for each project. Within each window i would have one pane for editing code and another pane running a development server. If you've used macos multi desktops you can think of a session as a macos machine, a window as a desktop, and a pane as a application window. And everything is persistent so you can detach from the session and reattach and all your windows and panes will be there as you left it.

Re: Using Vim as a Python IDE

#35
post #2

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

The most useful feature of tmux for me is the ability to switch between different projects effortlessly. Within a session i would have multiple windows, one for each project. Within each window i would have one pane for editing code and another pane running a development server. If you've used macos multi desktops you can think of a session as a macos machine, a window as a desktop, and a pane as a application window…

Apart from sessions, you can do that from within vim itself.

Re: Using Vim as a Python IDE

#36
Hadn't heard of w0rp/ale, but it looks like an improvement over Neomake. I feel like I've done a pretty good job at enabling a lot of features with only ~200LOC vimrc[0]. I also avoid dependencies that need to be compiled or depend on a scripting language installed to the system. My .zshrc these days even parallels my vimrc style[1].

[0]: https://github.com/jzelinskie/dotfiles/blob/master/.vimrc

[1]: https://github.com/jzelinskie/dotfiles/blob/master/.zshrc

Re: Using Vim as a Python IDE

#37

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

> i only got 4gb of ram

Well, for all of their benefits Electron apps in general have some hiccups on resource constrained systems.

Re: Using Vim as a Python IDE

#39

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…

How does this compare to something like sublime + anaconda?

VSCode (+ Python plugin) is much faster (I also have the feeling VSCode is using less resources than sublime+Anaconda!) and inline help is much more "helpful" during coding. I'm using Anaconda and Sublime since 1-2 years now and Anaconda is better than nothing but it pales when comparing it to VSCode (+Python plugin).

Re: Using Vim as a Python IDE

#40

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.

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.

https://github.com/julienr/vim-cellmode

Post reply on HN