Bystroushaak's blog / English section / Programming / Tools I use / Tools I use: PyCharm / Idea plugins

Tools I use: PyCharm / Idea plugins

In PyCharm (see also Tools I use: PyCharm), I am using the following plugins:

AceJump-Lite

👉
Also known as EasyMotion in other editors. There are multiple plugins which do the same thing. I found out by trying them all, that AceJump-Lite works best.

This is kinda hard to explain. It allows you to jump your cursor anywhere in the opened file, using just keyboard shortcuts.

This is the way how it works:

  1. You look at something. Some piece of text, some word or character.
  1. You press AceJump shortcut (F12 in my case).
  1. You press the character you are looking at.
  1. You press the character which appears next to the character you are looking at.
  1. The cursor now jumped there.

Confusing, I know. Here, let's see it in pictures.

Look at something

My cursor is on the end of the line 175, and I want to jump to the line 168, on the letter e in the editor. I am looking at the e in the editor.

Activate Acejump

Since I am looking at the character e, I press F12, to activate the AceJump, and then press the key e, to tell it what I am looking at.

AceJump will now annotate every e character with other characters. I keep my eyes on the e in the editor, so I see that the new characters qd now appeared in its place:

Notice that depending on the distance from the current cursor position, it will start with single character shortcuts, and continue to add characters.

Do the jump

To jump there, I now have to type qd. And here I am.

GIF version

It may sound complicated, but it is actually pretty easy and super quick:

CodeGlance2

Sexy minimap I got used to having when I used Sublime text:

The purpose of the minimap is not to just look great, it works instead of a scrollbar. You click on it, and it scrolls. You keep pressed the button on the mouse and move the mouse up and down, it scrolls up and down, just like the real scrollbar.

It may sound stupid, but it is actually one of the things I can't live without anymore. It gives you a weird sense of the shape of your code, and weirdly .. space-oriented feeling of navigation. Like when you are describing directions to someone, and you don't remember them by picture, but by the feeling of going left and right.

To make it work like the old Sublime minimap worked, before they fucked it up, do this:

Key Promoter X

Absolutely critical and super useful plugin. What it does is that when you do some action, it shows you the keyboard shortcut for it, in the bottom-right corner.

Now I can hear you thinking, "this doesn't sound like much". Wrong. This is absolutely critical thing which helps you improve and customize your IDE. You learn some new shortcut, you become better and more effective. This has huge compound interest. The sooner you'll get better, the more you'll get better.

Tab Shifter

Great plugin for moving tabs with opened editors to split views. The GIF on the plugin page explains it a lot.

PlantUML integration

Split view, which shows you a PlantUML image generated from your description. If you don't know why would you ever like to use PlantUML, read this Tools I use: mindmaps for dependencies, todo and debugging.

Requirements

This plugin allows you to work with requirements.txt, check the versions, and so on. Really useful if you are working with python code.

hidpi-profiles

Useful plugin for switching between sizes of fonts, menus and things like that.

Typical usage is that I use a 32" 4k display connected to my work notebook, so I have it configured to use bigger fonts, bigger sizes of all kinds of stuff. But when I disconnect it from the monitor to go to the meeting, my WM manager doesn't autoscale, so I switch PyCharm sizes using this.

Other tools

Of course, this is not all I use, but most of the other things are built-in in the paid version. Great support for Kubernetes (although I like k9s more), great database integration. Before I started using PyCharm, I usually used some kind of commandline tool for browsing databases, but I didn't open anything else than PyCharm ever since.

Highlight: multi-cursor edits

One of the things that I use most in PyCharm and other editors is one I see ignored the most; multi-cursor edits. Just in short, if you are not using it, let me convince you that you should. First of all:

  1. People usually think that it is just about multiple cursors, and that's all.

But that's wrong. Sure, you can just do things like this:

But that is completely missing the point of two other important features:

  1. Create cursors using pattern matching.
  1. Everything you do happens on all cursors. Even high-level operations and macros.

Pattern matching, in general, works like this:

  1. You select something.
  1. You tell the editor to select other things based on your selection.
  1. You can skip the matches you don't like.

Here, let's see how I skip the middle line:

Which brings me to the second important feature — you can use high-level operations on all the cursors:

It may not be so obvious from my example, but I've used a command "select everything in the scope" twice, when I was editing the strings. First it selected everything inside the strings, then it selected whole strings with quotes. Then I CTRL+x cut the selections, and copied and pasted them back in place of the now empty self.internal_dict[] constructions.

You can use all kinds of editor features with this. Transpose two selections. Capitalize them. Wrap them in quotes or brackets. Play a recorded macro on all of them.

What people usually don't get is how quickly you'll get used to this. Just learn four shortcuts (select another match, skip match, create next cursor up/down). And that's it. In a short time, you'll feel like if you have tentacles for text manipulation. It may seem useful for code, but I use it all the time, even for the normal text.

To sum it up:

  1. Multi-cursors are super useful every time you need to do some operation in more than one place.
  1. They are super quick to learn. Four shortcuts. Press ESC to collapse cursors back to one.
  1. They are much easier to use than recording and using macros.
  1. They are super quick to use. All the examples above are actually slowed down because usually, they just take a split second.

Here are some other articles that explain it nicely:

Relevant discussion

Become a Patron