[Tutor] What editor tools (plugins/extensions) would you consider essential for efficient Python development?
boB Stepp
robertvstepp at gmail.com
Mon Nov 11 22:33:57 EST 2019
On Mon, Nov 11, 2019 at 8:17 PM DL Neil via Tutor <tutor at python.org> wrote:
>
> Sorry @boB, I guess it comes down to 'spare time'. Also, it's a
> conversation that often leads to time-sinking 'religious wars'.
No apologies merited! Nor any intent to stir the editor wars pot either.
I _did_ ask about Visual Studio Code editor in a _separate_ thread,
but after trying out its Vim extension I decided to stick with what I
have been using Vim/Neovim. And I only asked about VSC because of an
article that popped up on my phone's news feed that suggested VSC is
the most popular editor currently and that piqued my interest.
>
> On 12/11/19 1:53 PM, boB Stepp wrote:
> > On Fri, Nov 8, 2019 at 9:54 PM boB Stepp <robertvstepp at gmail.com> wrote:
> >> What Neovim plugins would any of you recommend as especially useful?
> >> Searching online I have found a variety of opinions, but as to
> >> functionality I have seen suggested:
> >> 1) Git integration plugins.
> >> 2) Code completion plugins.
> >> 3) Linters.
> >> 4) File explorer plugins.
> >> 5) Bracket and quote completion plugins.
> >> 6) Comments plugins.
> >> 7) Code autoformatting plugins.
> >> 8) PEP 8 compatibility plugins.
> >> 9) Multiple cursor plugins.
> >> 10) Code folding plugins.
> >> 11) "Fuzzy" searching plugins.
> >> 12) And on and on and ...
> 3) Code linting, especially checking for PEP 8 and 257 compatibility;
> +1 (although "here be dragons", so being able to selectively turn-off
> specific checks is on the path of harmony and peaceful co-existence)
I think I am already encountering the dragons...
> 4) Code autoformatting;
> ? doesn't the (Python) editor do this
If we are speaking of the same thing, no. I am talking about tools
like Black, yapf and autopep8, which actually edit/rearrange your code
to make it conform to the selected coding style, usually PEP 8, but I
found optionally yapf does a Facebook and Google style.
> 5) Implementing type annotation and its checking
> +1 although I see mypy as operating at the same time as/effectively a
> single unit with pytest (which I saw a 'missing' from your previous
> list; despite my using just such a plug-in 'all the time')
I want to eventually switch to pytest, but I first want to master the
standard library unittest module. For instance at work I will never
have access to pytest because of their software installation
prohibitions on our planning software platform. And I don't think I
will lose anything as the pytest docs says it will happily run
unittest tests.
> >> 4) File explorer plugins.
> ? to do what
Apparently to have a "nicer" file system interface than what the
editor natively supplies.
> >> 5) Bracket and quote completion plugins.
> +1 but surely part of the editor
AFAIK, Vim/Neovim only natively highlights matching brackets, but will
not complete them for you. However, there are at least a couple of
plugins that will provide that functionality.
> >> 6) Comments plugins.
> ? which do what
Apparently allow for some sort of shortcut to insert comments or
convert non-commented lines into comments.
> >> 9) Multiple cursor plugins.
> +1 I find this very handy, from time-to-time (it's built-in to ST's editor)
I had checked out ST a few years ago and at that time this was one of
their oft-touted selling points. I played around with it a little
then, but my coding sophistication did not match the editor's
sophistication.
> >> 10) Code folding plugins.
> +1 again: editor/built-in
I know Vim/Neovim comes with something along these lines, but the
available plugins somehow offer something _more_.
> >> 11) "Fuzzy" searching plugins.
> ? which do what
Apparently you type _something_ into the search area and it will look
for _something_ in a variety of places: file names, contents of
files, contents of your open buffers, etc.
> Something which I'd like is a view/map of my entire (Python)
> application's entities showing how the pieces of the 'jig-saw' fit
> together, as well as a 'click on the link' facility to 'jump there'.
> Perhaps it already exists but outside of my vocabulary...
>
> I don't have one right now, but have seen editors/IDEs with a similar
> structure of elements within a single/the current file. Not so
> interesting, but then perhaps that's because I don't like to have too
> much* in a single file - and perhaps end-up with too many* file-imports.
In my brief look at VSC it had, off to the side, a representation of
the current file structure that would enable you to click inside it
and go approximately to that location. I don't know what it might (or
might not) display with a multi-file project loaded into the editor.
> Your other comment is worthy of consideration: all these things take
> time to learn and then commit to muscle-memory/to become habits.
> Meantime, your Python dev work is slowed/brain-power is being absorbed
> off-task.
>
> I have colleagues who trade editors, sorry, maybe that should be IDEs,
> about as often as they change their under-wear. That comment about it
> taking time to come-up-to-speed seems to convince them that I am mad
> (quite possible - you don't have to be to work here - but it helps!). At
> least I can type faster than they, suffer less from FoMo, and am
> waaaaaay better-looking)
Maybe this is a function of youth? My son, a teenager now, said to me
something like, "Papa, just try Visual Studio Code and see how you
like. If you don't like it, either try something else or go back to
what you had been using. It's no big deal!"
> Selecting good tools - and the right tool for the job, is a necessary
> component of efficiency. So, I'm convinced of the importance of a good
> editor - and that may vary by language or other choices. However, what's
> right for you, might not be for me - and vice-versa. It's "horses for
> courses" - not that I'm comparing your looks to a horse (front-end or
> back...)
+1
--
boB
More information about the Tutor
mailing list