Ask HN: Does anyone use Vim/Neovim for serious Python development?

5 points by behnamoh a year ago

I wish the state of Python was better in the Vim ecosystem, but I guess for data science work, Vim (or any terminal-based editor) will never be enough:

- when I first moved from VSCode to Vim/Neovim, I was surprised that basic language features had to be enabled using extensions and LSP was not part of the text editor. I get that Vim/Neovim are fast because the developers have kept them minimal and simple, but when lots of programmers use Vim/Neovim for programming, not including language features builtin doesn't send a good signal.

- data science involves drawing lots of graphs. an IDE (e.g., VSCode) shows them inline w/o any problem, but terminal apps open new windows to show images... then you'd have to close them one by one...

- I've had great success with VSCode when it came to symbolic computation using Sympy. I absolutely love that it can display rendered Latex equations inside VSCode. In terminal apps, that would probably open a new window.

- terminal could have a limit on input characters. with GPT-3, for example, I've had difficulty pasting a long prompt in iTerm 2, whereas VSCode handles it w/o any issues.

- I've assigned a shortcut to toggle VSCode just like a quake-mode terminal, and it's quite fast (if not even faster than iTerm 2 quake-mode). So I don't get the complaints about VSCode being slow. Sure, there's a second or two of startup time, but even a poorly configured Vim/Neovim with lots of plugins could get bloated and slow.

- Something I really like about IDEs is that you can sync your config and have an exact replica of your IDE on another machine. This syncing happens on the cloud (e.g., using your Github account), whereas terminal-based apps need you to backup their dotfiles frequently and git clone them on every new machine.

- I spent quite some time configuring and ricing Neovim to my liking, but after upgrading macOS from Monterey to Ventura, suddenly some extensions (e.g., Jedi) stopped working. A quick search on Google and someone literally said: "Have fun debugging your Vim config over the weekend." When I was 20, I'd take that as a challenge and maybe lowkey _wanted_ to spend my time fixing these things, but as a 30 yo I have more important things to do.

- Finally, I do wish some of the Vim/Neovim extensions were integrated into the software. For example, why should I have to install something like whichkey or nerdTree? I guess everyone agrees that when a system (Vim + extensions) is just a combination of hacked together components that are maintained independently and not well-tested on recent updates, if any extension breaks, it's possible to become the bottleneck of the whole system.

I do get the appeal of living in terminal, and I tried so hard to configure my Neovim to be usable for Python development and testing, but in the end, I had to switch back to VSCode. I do miss ranger, telescope, and undoTree extensions, but others such as vim.surround I was able to have in VSCode as well (using VSCode Neovim extension). I also miss tmux and I hate that VSCode doesn't let me fully maximize a panel or save the state of windows just like tmux + resurrect. I also don't like that with VSCode, I have to use the mouse for many tasks.

whinvik a year ago

> When I was 20, I'd take that as a challenge and maybe lowkey _wanted_ to spend my time fixing these things, but as a 30 yo I have more important things to do.

This. I struggled a lot with this as well. Ultimately with both Vim and Linux it seemed that the tools themselves became projects rather than whatever I was working on. I stopper caring eventually.

I still wish that there was some way I can have a good pre-configured Vim since VSCode can still feel slow sometimes.

lamarcke a year ago

I'm having a similar experience to you. I've tested almost all pre-made configs (that differ in maybe, 2 plugins and different keybinds) and my experience wasn't been so good.

I like the visuals, i like being able to work in the terminal, i like how slim it is. But debugging, or anything that closely resembles anything other than opening a text file and typing text, usually boils down hacking a bunch of plugins together.

My biggest problem has been the debugging part, i want all my attention in my code while i'm debugging, and i can't even seem to get started in getting DAP to work. I have hacked some random plugins together that resemble an UI, but it's still very simple, and doesn't work out of the box.

In the end, i'm trying really hard, setting up random plugins, reading docs and etc, just to have CLOSE to what VS Code can offer me, and nowhere close what Jetbrains does (the DB tools alone make it worth it)

I also don't like VSCode, mind you. I don't like the approach of using extensions as building blocks, generally because they depend on random people (that are almost always really competent) for maintaining, and who cares if they stop working? No one to blame.

I will probably resort to using Jetbrains IntelliJ and the IdeaVim plugin, which did work fine on my last testing.

kurtreed a year ago

I gave up on using Vim as an IDE and now I use an IDE as an IDE.

version_five a year ago

With iterm2 or kitty you can use imgcat to show images in the terminal, so you can see your plots that way.