I started using IntelliJ IDEA to write Java, and one thing kinda annoys me. When I fold a one-line method, it looks like this:
.
Is there any way to make it look like this?
Settings -> Editor -> General -> Code Folding. There is an entry 'One-line methods', which is marked by default. You can uncheck this checkbox to get rid of inconvenient code folding. There are shortcuts for folding/unfolding single method by combination Ctrl + '-'
/Ctrl + '+'
, or all methods in a file by combinations Ctrl + Shift + '-'
/Ctrl + Shift + '+'