Intellij: Highlight current block of code

坚强是说给别人听的谎言 提交于 2019-12-23 10:10:26

问题


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.


回答1:


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:



来源:https://stackoverflow.com/questions/38185597/intellij-highlight-current-block-of-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!