Live data from Hacker News

Using Vim as a Python IDE

liuchengxu.org

11–20 of 158 posts

Re: Using Vim as a Python IDE

#11
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
   * The idea of a project (Creating, building, export/importing, libraries, dependencies)
   * Automatically generated & maintained building system at the click of a run button
   * Documentation at a single click or on hover if possible
   * Integrated console for running a project
   * File and source manager that should be easy to use
   * Binding profiles for Eclipse, NetBeans, JetBrains, VS20XX, ReSharper
Optionally these would be nice:

   * Formal Method Verification? 
   * Coloring/styling of the entire TUI
   * Simple to interact with menus
   * Rust, Go, JavaScript (Browser & Node), Java, Scala, C, C++, PHP, Python support 
   * Pluggable language support that allows the plugin to provide static analysis & compiler data
If that can all be provided that could easily sell for $25 to $50 per user and I'd be happy, happy!, to pay every last dollar of it. It'll never happen. The world will never be that kind to software developers.

Re: Using Vim as a Python IDE

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

In fact I use byobu instead of plain tmux.

Re: Using Vim as a Python IDE

#13
post #8
post #2

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

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.

Re: Using Vim as a Python IDE

#14
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 against vim, just want to mention how impressed I was)

Re: Using Vim as a Python IDE

#15
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…

There's been "distros" of popular editors like Emacs and Vim aiming to provide this functionality. Spacemacs is one, and there's another one for Vim.

Re: Using Vim as a Python IDE

#16
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.

Re: Using Vim as a Python IDE

#17
post #8
post #2

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

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 is the best feature of tmux. It's worth pointing out here though (in a post about making the terminal act like an IDE), that you can split the terminal into two panes so you can have an editor and a REPL open at the same time similar to many IDE's. There are even some projects that make it easy to pass code between the editor and the REPL in the other pane, though I have never gotten them to work very well.

Re: Using Vim as a Python IDE

#18

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.

https://github.com/jpalardy/vim-slime

https://github.com/epeli/slimux

Re: Using Vim as a Python IDE

#19
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!

Re: Using Vim as a Python IDE

#20
post #2

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

Maybe my favorite feature of tmux, which I don't see mentioned here, is that I can configure it to start up in a certain way.

Using tmuxinator, I might set up a config for a rails project, for instance.

That way when I start tmux I get a vim editor in one window, a bash prompt in the next (for git), a rails server in the third, tests in the fourth, maybe another process in the 5th like sidekiq or something if required. Note, these (tmux-)windows all live inside of one terminal window.

So once you spend about 2 minutes writing that config, you can always start up your environment with tmuxinator start project-name and a few seconds later you're good to go.

Post reply on HN