I was wondering if it is possible to highlight the block of code you are working on in Intellij Idea.
There was a similar question here: Is there a way to highlight the currently active code block in Visual Studio 2010? .
So what I mean is that if you have clicked into e.g. a method or a while loop... ,the background of the whole block becomes a bit lighter or whatever.
Press ⌥↑ (macOS), or Ctrl+W (Windows/Linux), to extend your selection of code by scope. To reduce the scope, use ⌥↓ (macOS), or Shift+Ctrl+W (Windows/Linux). This can be useful for a visual representation of scope when moving blocks of code around.
If you want to highlight a whole line of text, move your cursor to the start of the line, hold the Shift key, and then press the Down arrow . You may also use the shortcut key combination Shift + End . If you want to highlight all text (the entire page), press the shortcut key Ctrl + A .
Sometimes code formatting can get out of sync, but there's an easy fix in IntelliJ IDEA. You can use ⌘⌥L (macOS), or Ctrl+Alt+L (Windows/Linux) to reformat a selection of code according to your reformat settings.
There's already one such feature, but it's more subtle, in the form of a vertical line inside the left gutter... I can't recall whether it's enabled by default or not, but you can activate it by File -> Settings -> Editor -> General
, scroll to the Highlight on Caret Movement
section (about half of the page).
I looked around for a while but I have not yet found a way to change its appearance to match your description, although I personally prefer this less intrusive highlight than having all the background changed.
P.S. Not sure this is relevant or useful to you, but there was a plugin I tried a while ago called CodeGlance which offered a scrollable-map of the class:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With