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…
I also have been switching over to VSCode for coding. The vim plugin is pretty decent. I still keep vim around for huge files though. I work daily with NASTRAN input and output files, routinely multiple 100 mb, sometimes multiple-gb. I edited a 10gb file earlier this week and vim didn't choke up too much. Best editor I've found so far for huge files.
Using Vim as a Python IDE
91–100 of 158 posts
Re: Using Vim as a Python IDE
#92Earlier quoted context omitted.
Also, comes with org-babel that can do similar stuff with literate programming.. Also not sure how people live without it.
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.
Re: Using Vim as a Python IDE
#93How do you jump to definition?
More useful, IMHO, is the general solution of jumping to the definition that would be resolved by the python interpreter, regardless of location. For that, the key binding will depend on the plugin. For `jedi-vim`, you use `d` [0].
Incidentally, if you're new to using VIM as a python IDE, also note the value of `jedi-vim` providing Python docstrings via the standard VIM keybinding `K`. This is also mentioned in [0].
Re: Using Vim as a Python IDE
#94Autocomplete with Conda has got no support - if anyone has any idea other than; https://github.com/cjrh/vim-conda
Add it to your `ftplugin/python.vim`. Requires you to have activated the Conda environment before opening the Python file, uses hard-coded Python versions, doesn't work with multiple environments, doesn't bother with `os.path.join` so no Windows compatibility, etc etc. Like I said: a hack.
" Cheap trick to use the Conda environment with omnicompletion
python3
edit: mentioned `os.path.join` to warn Windows users and fixed in-place bugfix.Re: Using Vim as a Python IDE
#95Re: Using Vim as a Python IDE
#96Emacs 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.
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.
Re: Using Vim as a Python IDE
#97Yesterday 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…
I also have been switching over to VSCode for coding. The vim plugin is pretty decent. I still keep vim around for huge files though. I work daily with NASTRAN input and output files, routinely multiple 100 mb, sometimes multiple-gb. I edited a 10gb file earlier this week and vim didn't choke up too much. Best editor I've found so far for huge files.
Re: Using Vim as a Python IDE
#98Earlier quoted context omitted.
Well this is your use case. I use Linux every day but I never touch python code directly on remote systems (it's getting automatically or manually deployed). All my python code lives in virtualenv locally here. But I understand when people work for many projects they maybe want to encapsulate it more (vagrant etc.).
Of course, use cases are different. In my case I usually deploy either automatically or manually, but in those rare cases when you can't replicate bug locally there is nothing better than vi. But of course, to each his own.
Yeah, nobody does that. Well, nobody who has any kind of serious operation going on.
If you can't replicate a bug outside a production environment you have a serious deficit in the devops department.
You should be able to stage a machine with a copy of the production DB/data and the same reproducible package(code) that currently runs on your production systems.
Everything else is just an accident waiting to happen.
Re: Using Vim as a Python IDE
#99Hadn'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.c…
Even though I write ruby and javascript all day, I still like to go and read how others are using vim. I usually walk away with a keybinding or plugin that makes my life better.
Re: Using Vim as a Python IDE
#100Emacs 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 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