How to auto-center current file in Project tree when switching files?

已回答

I have "Always Select Opened File" working - it highlights the current file in the Project tree. However, when I switch between files, the highlighted file is not automatically centered/scrolled into view in the Project tree.

I need the Project tree to automatically scroll so the selected file is always visible in the center of the panel, not at the top/bottom edges.

What setting am I missing for auto-centering?

Current Behavior:

✅ Works: File Gets Highlighted

Project Tree:
├── src/main/java/com/company/
│   ├── service/
│   │   └── UserService.java  ← HIGHLIGHTED ✅

❌ Missing: No Auto-Centering

File appears at TOP edge:

Project Panel View:
┌─────────────────────────────┐
│ └── UserService.java ←──────┼── Appears at TOP edge ❌
│                             │
│ (lots of empty space)       │
│                             │
│                             │
│                             │
│                             │
└─────────────────────────────┘

OR file appears at BOTTOM edge:

┌─────────────────────────────┐
│                             │
│                             │
│ (lots of empty space)       │
│                             │
│                             │
│                             │
│ └── UserService.java ←──────┼── Appears at BOTTOM edge ❌
└─────────────────────────────┘

What I Need:

Perfectly centered file in Project panel:

Project Panel View:
┌─────────────────────────────┐
│ ├── controller/             │
│ │   └── UserController.java │
│ ├── service/                │
│ │   └── UserService.java ←──┼── PERFECTLY CENTERED ✅
│ ├── repository/             │
│ │   └── UserRepository.java │
│ └── model/                  │
└─────────────────────────────┘

Looking for the setting that enables auto-scrolling/centering when switching between files. Any help would be appreciated!

0

We have no dedicated UI setting for that, sadly, but there is a feature request IJPL-182044 that you might want to upvote.

Please try the workaround from the ticket description, hope it solves the issue for you. 

0

Thanks a lot man @... . THIS IS WHAT I NEED EXACTLY.

0

请先登录再写评论。